Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Remove Docker release process #540

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
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
9 changes: 0 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ release:
name: kubeaudit
draft: true
name_template: "{{.ProjectName}}-v{{.Version}}"
dockers:
- dockerfile: goreleaser.Dockerfile
goos: linux
goarch: amd64
goarm: ''
image_templates:
- "shopify/kubeaudit:latest"
- "shopify/kubeaudit:{{ .Tag }}"
- "shopify/kubeaudit:v{{ .Major }}.{{ .Minor }}"
builds:
- goos:
- linux
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Kubeaudit has official releases that are blessed and stable:

### DIY build

Master may have newer features than the stable releases. If you need a newer
Main may have newer features than the stable releases. If you need a newer
feature not yet included in a release, make sure you're using Go 1.17+ and run
the following:

Expand All @@ -73,7 +73,9 @@ or

### Docker

We also release a [Docker image](https://hub.docker.com/r/shopify/kubeaudit): `shopify/kubeaudit`. To run kubeaudit as a job in your cluster see [Running kubeaudit in a cluster](docs/cluster.md).
We no longer release images to Docker Hub (since Docker Hub sunset Free Team organizations). For the time being, [old images](https://hub.docker.com/r/shopify/kubeaudit) are still available but may stop being available at any time. We will start publishing images to the Github Container registry soon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

To run kubeaudit as a job in your cluster see [Running kubeaudit in a cluster](docs/cluster.md).

## Quick Start

Expand Down Expand Up @@ -334,7 +336,7 @@ To learn more about labels, see https://kubernetes.io/docs/concepts/overview/wor

## Contributing

If you'd like to fix a bug, contribute a feature or just correct a typo, please feel free to do so as long as you follow our [Code of Conduct](https://github.com/Shopify/kubeaudit/blob/master/CODE_OF_CONDUCT.md).
If you'd like to fix a bug, contribute a feature or just correct a typo, please feel free to do so as long as you follow our [Code of Conduct](./CODE_OF_CONDUCT.md).

1. Create your own fork!
1. Get the source: `go get github.com/Shopify/kubeaudit`
Expand Down
4 changes: 3 additions & 1 deletion docs/cluster.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Running kubeaudit in a Cluster

Kubeaudit can be run in a Kubernetes cluster by using the [official Docker image](https://hub.docker.com/r/shopify/kubeaudit): `shopify/kubeaudit`.
Kubeaudit can be run in a Kubernetes cluster by using a Docker image.

We no longer release images to Docker Hub (since Docker Hub sunset Free Team organizations). For the time being, [old images](https://hub.docker.com/r/shopify/kubeaudit) are still available but may stop being available at any time. We will start publishing images to the Github Container registry soon.

## Without RBAC

Expand Down
24 changes: 7 additions & 17 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# How to Create a Kubeaudit Release

1. Make sure you're on master and have the latest changes.
1. Make sure you're on main and have the latest changes.

2. Find the [latest release](https://github.com/Shopify/kubeaudit/releases).

> We use [semver](https://semver.org/) versioning. In semver, version numbers have the format `v<MAJOR>.<MINOR>.<PATCH>`. However, because we still consider Kubeaudit to be in "alpha", the major number is always 0. This means that we do not maintain versions from before a breaking change, and updating to a new minor version may introduce a breaking change.

If the changes since the most recent release are bug fixes only, bump the last number (the patch version). If any of the changes since the last release include a new feature or breaking change, bump the second number (the minor version) and set the last number to 0 (the patch version). For example, if the latest release is `v0.11.5` and there were only bug fixes merged to master since then, the next version number will be `v0.11.6`. If there were new features added or a breaking change was made, the next version would be `v0.12.0`.
If the changes since the most recent release are bug fixes only, bump the last number (the patch version). If any of the changes since the last release include a new feature or breaking change, bump the second number (the minor version) and set the last number to 0 (the patch version). For example, if the latest release is `v0.11.5` and there were only bug fixes merged to main since then, the next version number will be `v0.11.6`. If there were new features added or a breaking change was made, the next version would be `v0.12.0`.

3. Update the `VERSION` file if necessary. You'll have to open / merge a PR to do this.

Expand All @@ -24,31 +24,21 @@ git tag -a v0.11.6 -m "v0.11.6"
git push origin v0.11.6
```

5. Login to Docker

Login to the Shopify Docker account using `docker login`. Find the credentials in password manager.

6. You will need a Github token in order for Goreleaser to be able to create a release in Github. If you already have one, skip to the next step.
5. You will need a Github token in order for Goreleaser to be able to create a release in Github. If you already have one, skip to the next step.

[Create a Github token](https://github.com/settings/tokens/new) with the `repo` scope.

7. Run Goreleaser

Make sure you have Docker daemon running. If you're on a Mac, one option is to install [colima](https://github.com/abiosoft/colima) by running `brew install colima`, followed by `colima start`. This will allow you to run the docker daemon in the background. You can verify that colima has started correctly by running `docker context list`. You should be able to see the colima context on the list. If not, follow the troubleshooting steps described in [these docs](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running).
6. Run Goreleaser

```
GITHUB_TOKEN=<YOUR TOKEN> goreleaser --rm-dist
```

8. Logout of docker

Logout of the Shopify Docker account: `docker logout`

9. Publish the release in Github
7. Publish the release in Github

Goreleaser is set to draft mode which means it will create a draft release in Github, allowing you to double check the release and make changes to the Changelog. Find the [draft release](https://github.com/Shopify/kubeaudit/releases) and make sure there are no commits to master since the release.
Goreleaser is set to draft mode which means it will create a draft release in Github, allowing you to double check the release and make changes to the Changelog. Find the [draft release](https://github.com/Shopify/kubeaudit/releases) and make sure there are no commits to main since the release.

> If there are commits to master since the release, this may mean you didn't make the tag on master or your master is out of date.
> If there are commits to main since the release, this may mean you didn't make the tag on main or your main is out of date.

Click `Edit` on the right of the draft release and tidy up the Changelog if necessary. We like to add thank you's to external contributors, for example:

Expand Down