From 96222d9c26702111d941ac802df75774563ed04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Tue, 12 Nov 2024 10:21:18 +0100 Subject: [PATCH] ci: switch to releaser-pleaser (#778) Switch to releaser-pleaser[0] for planning new releases. This adds the following new features: - We can easily cut pre-releases, these are always useful if we want to allow some customers to test features before making an official release or to validate changes made to the release CI workflows - We can add our own release notes to each release to better inform customers about the new features we added or about any deprecations. [0] https://github.com/apricote/releaser-pleaser --- .github/release-please-config.json | 20 -------------- .github/release-please-manifest.json | 1 - .github/workflows/release-please.yml | 18 ------------ .github/workflows/releaser-pleaser.yml | 32 ++++++++++++++++++++++ .github/workflows/test.yml | 2 +- chart/.snapshots/default.yaml | 4 +-- chart/.snapshots/example-prod.yaml | 4 +-- chart/.snapshots/full.yaml | 4 +-- chart/Chart.yaml | 2 +- chart/templates/controller/deployment.yaml | 2 +- chart/templates/node/daemonset.yaml | 2 +- deploy/kubernetes/hcloud-csi.yml | 4 +-- internal/driver/driver.go | 2 +- 13 files changed, 45 insertions(+), 52 deletions(-) delete mode 100644 .github/release-please-config.json delete mode 100644 .github/release-please-manifest.json delete mode 100644 .github/workflows/release-please.yml create mode 100644 .github/workflows/releaser-pleaser.yml diff --git a/.github/release-please-config.json b/.github/release-please-config.json deleted file mode 100644 index b8110a89..00000000 --- a/.github/release-please-config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "bootstrap-sha": "9a352361bc1392962c3e75384cf92d99664f902f", - "include-component-in-tag": false, - "include-v-in-tag": true, - "packages": { - ".": { - "release-type": "go", - "package-name": "csi-driver", - "extra-files": [ - "internal/driver/driver.go", - "deploy/kubernetes/hcloud-csi.yml", - "chart/.snapshots/default.yaml", - "chart/.snapshots/example-prod.yaml", - "chart/.snapshots/full.yaml", - "chart/Chart.yaml" - ] - } - } -} diff --git a/.github/release-please-manifest.json b/.github/release-please-manifest.json deleted file mode 100644 index af09d1ff..00000000 --- a/.github/release-please-manifest.json +++ /dev/null @@ -1 +0,0 @@ -{".":"2.10.0"} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index 29470218..00000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Release-please - -on: - push: - branches: [main] - -jobs: - release-please: - # Do not run on forks. - if: github.repository == 'hetznercloud/csi-driver' - - runs-on: ubuntu-latest - steps: - - uses: googleapis/release-please-action@v4 - with: - token: ${{ secrets.HCLOUD_BOT_TOKEN }} - config-file: .github/release-please-config.json - manifest-file: .github/release-please-manifest.json diff --git a/.github/workflows/releaser-pleaser.yml b/.github/workflows/releaser-pleaser.yml new file mode 100644 index 00000000..98b2b894 --- /dev/null +++ b/.github/workflows/releaser-pleaser.yml @@ -0,0 +1,32 @@ +name: Releaser-pleaser + +on: + push: + branches: [main] + pull_request_target: + types: + - edited + - labeled + - unlabeled + +jobs: + releaser-pleaser: + # Do not run on forks. + if: github.repository == 'hetznercloud/csi-driver' + + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: releaser-pleaser + uses: apricote/releaser-pleaser@v0.4.2 + with: + token: ${{ secrets.HCLOUD_BOT_TOKEN }} + extra-files: | + internal/driver/driver.go + deploy/kubernetes/hcloud-csi.yml + chart/.snapshots/default.yaml + chart/.snapshots/example-prod.yaml + chart/.snapshots/full.yaml + chart/Chart.yaml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d059292d..33f280f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - name: Upload coverage reports to Codecov if: > !startsWith(github.head_ref, 'renovate/') && - !startsWith(github.head_ref, 'release-please--') + !startsWith(github.head_ref, 'releaser-pleaser--') uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/chart/.snapshots/default.yaml b/chart/.snapshots/default.yaml index 3e540bcc..1d5407bd 100644 --- a/chart/.snapshots/default.yaml +++ b/chart/.snapshots/default.yaml @@ -180,7 +180,7 @@ spec: limits: {} requests: {} - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-node] volumeMounts: @@ -313,7 +313,7 @@ spec: name: socket-dir - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-controller] env: diff --git a/chart/.snapshots/example-prod.yaml b/chart/.snapshots/example-prod.yaml index 2d5b99a1..92a1f90f 100644 --- a/chart/.snapshots/example-prod.yaml +++ b/chart/.snapshots/example-prod.yaml @@ -249,7 +249,7 @@ spec: cpu: 10m memory: 20Mi - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-node] volumeMounts: @@ -424,7 +424,7 @@ spec: name: socket-dir - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-controller] env: diff --git a/chart/.snapshots/full.yaml b/chart/.snapshots/full.yaml index 664d5f2d..bd200b4e 100644 --- a/chart/.snapshots/full.yaml +++ b/chart/.snapshots/full.yaml @@ -301,7 +301,7 @@ spec: cpu: 12m memory: 22Mi - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: Always command: [/bin/hcloud-csi-driver-node] volumeMounts: @@ -555,7 +555,7 @@ spec: name: socket-dir - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: Always command: [/bin/hcloud-csi-driver-controller] env: diff --git a/chart/Chart.yaml b/chart/Chart.yaml index ebafdf5d..2f94e2c7 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -7,4 +7,4 @@ maintainers: - name: Hetzner Cloud email: support@hetzner.com url: https://github.com/hetznercloud -version: 2.10.0 +version: 2.10.0 # x-releaser-pleaser-version diff --git a/chart/templates/controller/deployment.yaml b/chart/templates/controller/deployment.yaml index 2c2c9a94..5d178257 100644 --- a/chart/templates/controller/deployment.yaml +++ b/chart/templates/controller/deployment.yaml @@ -131,7 +131,7 @@ spec: name: socket-dir - name: hcloud-csi-driver - image: {{ include "common.images.image" (dict "value" .Values.controller.image.hcloudCSIDriver "context" .) }} # x-release-please-version + image: {{ include "common.images.image" (dict "value" .Values.controller.image.hcloudCSIDriver "context" .) }} # x-releaser-pleaser-version imagePullPolicy: {{ .Values.controller.image.hcloudCSIDriver.pullPolicy }} command: [/bin/hcloud-csi-driver-controller] env: diff --git a/chart/templates/node/daemonset.yaml b/chart/templates/node/daemonset.yaml index 65b09e4a..ec1ee4c5 100644 --- a/chart/templates/node/daemonset.yaml +++ b/chart/templates/node/daemonset.yaml @@ -99,7 +99,7 @@ spec: resources: {{- toYaml .Values.node.resources.livenessProbe | nindent 12 }} {{- end }} - name: hcloud-csi-driver - image: {{ include "common.images.image" (dict "value" .Values.node.image.hcloudCSIDriver "context" .) }} # x-release-please-version + image: {{ include "common.images.image" (dict "value" .Values.node.image.hcloudCSIDriver "context" .) }} # x-releaser-pleaser-version imagePullPolicy: {{ .Values.node.image.hcloudCSIDriver.pullPolicy }} command: [/bin/hcloud-csi-driver-node] volumeMounts: diff --git a/deploy/kubernetes/hcloud-csi.yml b/deploy/kubernetes/hcloud-csi.yml index 73510a4c..4212e22a 100644 --- a/deploy/kubernetes/hcloud-csi.yml +++ b/deploy/kubernetes/hcloud-csi.yml @@ -212,7 +212,7 @@ spec: limits: {} requests: {} - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-node] volumeMounts: @@ -346,7 +346,7 @@ spec: name: socket-dir - name: hcloud-csi-driver - image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-release-please-version + image: docker.io/hetznercloud/hcloud-csi-driver:v2.10.0 # x-releaser-pleaser-version imagePullPolicy: IfNotPresent command: [/bin/hcloud-csi-driver-controller] env: diff --git a/internal/driver/driver.go b/internal/driver/driver.go index dc2f65f4..1853ba96 100644 --- a/internal/driver/driver.go +++ b/internal/driver/driver.go @@ -2,7 +2,7 @@ package driver const ( PluginName = "csi.hetzner.cloud" - PluginVersion = "2.10.0" // x-release-please-version + PluginVersion = "2.10.0" // x-releaser-pleaser-version MaxVolumesPerNode = 16 MinVolumeSize = 10 // GB