https://github.com/catvec/kubeci
Kubernetes command line tool for use during the continuous integration process
https://github.com/catvec/kubeci
Last synced: 7 months ago
JSON representation
Kubernetes command line tool for use during the continuous integration process
- Host: GitHub
- URL: https://github.com/catvec/kubeci
- Owner: catvec
- License: mit
- Created: 2017-07-25T00:33:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T21:49:29.000Z (over 7 years ago)
- Last Synced: 2025-05-04T01:02:14.199Z (11 months ago)
- Language: Go
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Project status: Stale | Not completed | Kept for archival purposes
I created a tool which solves some of the problems this project was planning to solve named [k8s-deploy](http://github.com/Noah-Huppert/k8s-deploy).
# kubeci
Command line tool which performs Kubernetes operations commonly required during continuous integration.
# Table Of Contents
- [Usage](#usage)
- [Run](#run)
- [List](#list)
- [Help](#help)
- [Development](#development)
- [Dependency Vendoring](#dependency-vendoring)
- [Build](#build)
- [Development Build](#development-build)
- [Test](#test)
- [Release](#release)
- [Pre Release Checklist](#pre-release-checklist)
- [Release Build](#release-build)
- [Uploading](#uploading)
# Usage
Kubeci is a binary which provides a command line interface. Subcommands are described in the following section.
## Run
Kubeci provides numerous operations. These operations run common Kubernetes actions.
You can run these kubeci operations with the `run` command.
Usage: `$ kubeci run [operation name] --os `
Options:
- `operation name` (string): Name of operation to run
- **required**
- `operating system` (string): Name of operating system kubeci is running commands on
- **required**
- Used to run different variations of certain commands (ex., package management commands)
- Allowed values:
- `alpine`: Alpine Linux
## List
List all available kubeci operations.
Usage: `$ kubeci list`
## Help
Provide general kubeci help or specific operation help.
Usage: `$ kubeci help [operation name]`
Options:
- `operation name` (string): Name of operation to provide help about
- *optional*
- If no operation name is provided general kubeci help will be displayed
# Development
This section describes how to perform common development tasks for the kubeci tool.
## Dependency Vendoring
Kubeci uses [dep](https://github.com/golang/dep), Go's official dependency vendoring tool. To install it run:
```bash
$ go get -u github.com/golang/dep/cmd/dep
```
Then to install kubeci's dependencies:
```bash
$ dep ensure
```
## Build
To build kubeci run:
```bash
$ go build -o build/kubeci ./kubeci
```
The `kubeci` binary will then be available in the `build` directory.
## Development Build
To run kubeci locally execute:
```bash
$ go run kubeci/kubeci.go
```
## Test
To test kubeci run:
```bash
$ go test -cover ./kubeci/...
```
# Release
This section describes the kubeci release process.
Kubeci uses GNU Make in the release process, please ensure it is installed.
## Pre Release Checklist
Before a release can be built the following steps must occur:
1. Run tests
- Run `$ go test ./kubeci/...`
1. Increment version number according to [SemVer 2.0](http://semver.org/)
- In `kubeci/kubeci.go`
2. Tag Git commit with incremented version number
- Run `$ VERSION=x.y.z make tag`
## Release Build
Kubeci is built for:
- Linux
- 64-bit
- 32-bit
- OSX
- 64-bit
- 32-bit
- Windows
- 64-bit
- 32-bit
To build all targets run:
```bash
$ make cross-compile-all
```
Or `make cca` for short. The kubeci binaries will be output to the `build` directory. Separated by directory for OS and
system architecture.
Next package all the builds up by running:
```bash
$ make package-all
```
Or `make pa` for short. The kubeci binary archives will be in the `dist` directory. Named in the form:
`$OS-$ARCH-kubeci.tar.gz`.
Then push to the remote Git server with:
```bash
$ git push origin master
```
# Uploading
To upload a release navigate to the [GitHub Release Creation Page](https://github.com/Noah-Huppert/kubeci/releases/new).
Next select your newly created tag. Enter a release title and write a release description. Attatch the contents of the
`dist` directory to the release with the upload feature.
Click the "Publish release" button to finalize the release.