From ac85ed35cdb8c5c5340ed88706f2cbddcd27bc9b Mon Sep 17 00:00:00 2001 From: phillc <15082+phillc@users.noreply.github.com> Date: Fri, 27 Mar 2020 15:57:33 -0400 Subject: [PATCH 1/2] Fix image creation --- .github/workflows/docker-hub.yml | 1 + README.md | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 6d4386ce..f9fa502b 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -16,3 +16,4 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: "latest,${{ github.event.release.tag_name }}" + workdir: "app/linode" diff --git a/README.md b/README.md index 3c525e8f..00cf82cb 100644 --- a/README.md +++ b/README.md @@ -138,17 +138,6 @@ persistence Want to improve the linode-blockstorage-csi-driver? Please start [here](.github/CONTRIBUTING.md). -## Doing a Release - -1. Open up the Makefile. -1. Check that the `IMAGE_VERSION` variable is set to the value that you want. You should always start with a `canary` release. -1. run `make push`. As of this writing, the `push` target depends upon the `linode-container`, `linode`, `vendor, and `test` targets. So the code should be vendored, the tests should run, the build should run, a container should be built, and it should be pushed to the container registry. -1. Test the new canary version on a live cluster. -1. Change `IMAGE_VERSION` to the new version of the CSI driver, for exmaple `v0.2.1` -1. Run `make push` again -1. Push a git tag for the new version, perferrably pgp signed. -1. Make a GitHub release and write the release notes for the release. - ## Join us on Slack For general help or discussion, join the [Kubernetes Slack](http://slack.k8s.io/) channel [#linode](https://kubernetes.slack.com/messages/CD4B15LUR). From 6b524ab68d564a4860c6d531cc1d7dada2f21d91 Mon Sep 17 00:00:00 2001 From: phillc <15082+phillc@users.noreply.github.com> Date: Mon, 30 Mar 2020 12:06:26 -0400 Subject: [PATCH 2/2] Generate manifest and check it in --- .github/workflows/docker-hub.yml | 2 +- .github/workflows/generate-manifest.yml | 21 +++++++++++++++++++++ Makefile | 1 - 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/generate-manifest.yml diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index f9fa502b..1393537f 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -8,7 +8,7 @@ jobs: steps: - uses: actions/checkout@master - name: Build - run: make build-linux + run: make linode - name: Publish latest to Registry uses: elgohr/Publish-Docker-Github-Action@master with: diff --git a/.github/workflows/generate-manifest.yml b/.github/workflows/generate-manifest.yml new file mode 100644 index 00000000..9832b682 --- /dev/null +++ b/.github/workflows/generate-manifest.yml @@ -0,0 +1,21 @@ +name: Release manifests +on: + release: + types: [published] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Build manifest + run: "./hack/release-yaml.sh ${{ github.event.release.tag_name }}" + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add -- pkg/linode-bs/deploy/releases/linode-blockstorage-csi-driver*\.yaml + git commit -m "Update manifests" + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Makefile b/Makefile index 4f451edf..a92923b9 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,6 @@ linode-container: linode .PHONY: push push: linode-container - #@echo "$$DOCKER_PASSWORD" | docker login -u "$$DOCKER_USERNAME" --password-stdin docker push $(IMAGE_TAG) .PHONY: verify