From 0a820d1e0d14b1b5d15b52f2d1b34e486ff12d7e Mon Sep 17 00:00:00 2001 From: Genevieve Luyt <11131143+genevieveluyt@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:15:37 -0400 Subject: [PATCH] Remove Docker release process (#540) --- .goreleaser.yml | 9 --------- README.md | 8 +++++--- docs/cluster.md | 4 +++- docs/release.md | 24 +++++++----------------- 4 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index fa1cdd7e..3f5df7f3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 diff --git a/README.md b/README.md index a4580701..40ecbdc0 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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. + +To run kubeaudit as a job in your cluster see [Running kubeaudit in a cluster](docs/cluster.md). ## Quick Start @@ -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` diff --git a/docs/cluster.md b/docs/cluster.md index d24809f5..a05c0893 100644 --- a/docs/cluster.md +++ b/docs/cluster.md @@ -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 diff --git a/docs/release.md b/docs/release.md index a68eccda..6bdb0605 100644 --- a/docs/release.md +++ b/docs/release.md @@ -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..`. 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. @@ -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= 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: