Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README to make it more readable. #26

Merged
merged 1 commit into from
Dec 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,26 @@
[![license](https://img.shields.io/badge/license-MIT-4183c4.svg)](https://github.com/p1ass/mikku/blob/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/p1ass/mikku)](https://goreportcard.com/report/github.com/p1ass/mikku)

`mikku` is a CLI command tool to help version management and manifest update in Kubernetes.
`mikku` is a CLI tool to help version management and Kubernetes manifest updates.

## Features
- Create GitHub releases with bumping Semantic Versioning tag
- Send pull requests which update docker image tag.
- Support `{{.Owner}}` and `{{.Repository}}` placeholder in environment variables and command-line options when setting configs.

## Screenshots

### Release

![changelog](images/changelog.png)


### PullRequest

![diff](images/diff.png)


## Installation

### From GitHub release

If you use Windows or Linux, you use `windows_amd64` or `linux_amd64` instead of `darwin_amd64`.
If you use Windows or Linux, replace `windows_amd64` or `linux_amd64` instead of `darwin_amd64`.

```bash
$ TAG=0.2.0
$ curl -O -L https://github.com/p1ass/mikku/releases/download/v${TAG}/mikku_${TAG}_darwin_amd64.tar.gz
$ tar -zxvf mikku_${TAG}_darwin_amd64.tar.gz
$ chmod a+x mikku
$ mv mikku /usr/local/bin/mikku
$ mikku --help
```


Expand Down Expand Up @@ -79,7 +68,7 @@ Note that `mikku` doesn't build and push a docker image, so you have to do it us

### Create a pull request updating docker image tag in Kubernetes manifest file

Update image tag in Kubernetes manifest file existing in `MIKKU_MANIFEST_REPOSITORY` to the latest version.
Update image tag in Kubernetes manifest file to the latest version.
```bash
$ export MIKKU_MANIFEST_REPOSITORY=sample-manifest-repository
$ export MIKKU_MANIFEST_FILEPATH=manifests/{{.Repository}}/deployment.yml
Expand All @@ -88,6 +77,35 @@ $ export MIKKU_DOCKER_IMAGE_NAME={{.Owner}}/{{.Repository}}
$ mikku pr sample-repository
```

```yaml
spec:
containers:
- name: sample-repository-container
image: p1ass/sample-repository:v1.0.0
↓ Replace
image: p1ass/sample-repository:v1.0.1
```


## Screenshots

### Release

```bash
$ mikku release sample-repository v0.1.1
```

![changelog](images/changelog.png)


### PullRequest

```bash
$ mikku pr memoito-server
```

![diff](images/diff.png)

## Commands

#### `mikku release <repository> <major | minor | patch | (version)>`
Expand All @@ -113,16 +131,8 @@ $ mikku release sample-repository major # v1.1.0 → v2.0.0

#### `mikku pr [-m <manifest-repository>] [-p <path-to-manifest-file>] [-i <image-name>] <repository>`

Create a pull request updating Docker image tag written in Kubernetes manifest file as below:
Create a pull request updating Docker image tag written in Kubernetes manifest file.

```yaml
spec:
containers:
- name: sample-repository-container
image: p1ass/sample-repository:v1.0.0
↓ Replace
image: p1ass/sample-repository:v1.0.1
```

##### Options

Expand Down Expand Up @@ -194,4 +204,4 @@ go test -v ./...

## LICENCE

MIT
MIT