From 9ea3d496117a79ab344718278783bf8fdd7ed9cd Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Wed, 27 Dec 2023 11:29:28 +0200 Subject: [PATCH 1/4] EVEREST-107 main/pr checks --- .github/workflows/checks.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b2009d71..b16d7fa4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -55,6 +55,18 @@ jobs: # use GITHUB_TOKEN because only it has access to GitHub Checks API bin/golangci-lint run --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -reporter=github-pr-review -filter-mode=nofilter -fail-on-error=true + - name: Check default main state - dev version + run: | + if ! grep -q "VERSION ?= 0.0.0" Makefile; then + exit 1 + fi + + - name: Check default main state - generated files + run: | + make release + echo "Checking there is no source code changes except of the file with the generated date after a release attempt" + git diff --exit-code $(git ls-files | grep -v "bundle/manifests/everest-operator.clusterserviceversion.yaml") + - name: Run debug commands on failure if: ${{ failure() }} run: | From ccf9061a5a6cd9a6e2dec664c16735f4d7a8ef14 Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Wed, 27 Dec 2023 11:35:34 +0200 Subject: [PATCH 2/4] EVEREST-107 update Makefile --- .github/workflows/checks.yml | 7 ++++--- Makefile | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b16d7fa4..fca26cc2 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -57,9 +57,10 @@ jobs: - name: Check default main state - dev version run: | - if ! grep -q "VERSION ?= 0.0.0" Makefile; then - exit 1 - fi + if ! grep -q "VERSION ?= 0.0.0" Makefile; then + echo "default VERSION in Makefile should be 0.0.0" + exit 1 + fi - name: Check default main state - generated files run: | diff --git a/Makefile b/Makefile index 23e0f5e2..00a34adc 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.6.0-dev2 +VERSION ?= 0.0.0 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") From cedd739f4fd5c462e8cf91f12b8a6903035c10d4 Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Wed, 27 Dec 2023 11:54:37 +0200 Subject: [PATCH 3/4] EVEREST-107 0.0.0 dev release --- .../manifests/everest-operator.clusterserviceversion.yaml | 8 ++++---- config/manager/kustomization.yaml | 2 +- deploy/bundle.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bundle/manifests/everest-operator.clusterserviceversion.yaml b/bundle/manifests/everest-operator.clusterserviceversion.yaml index 487dd2c0..ca910b94 100644 --- a/bundle/manifests/everest-operator.clusterserviceversion.yaml +++ b/bundle/manifests/everest-operator.clusterserviceversion.yaml @@ -103,10 +103,10 @@ metadata: } ] capabilities: Basic Install - createdAt: "2023-12-21T09:54:14Z" + createdAt: "2023-12-27T09:53:47Z" operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 - name: everest-operator.v0.6.0-dev2 + name: everest-operator.v0.0.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -551,7 +551,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: docker.io/perconalab/everest-operator:0.6.0-dev2 + image: docker.io/perconalab/everest-operator:0.0.0 livenessProbe: httpGet: path: /healthz @@ -645,4 +645,4 @@ spec: provider: name: Percona url: https://percona.com - version: 0.6.0-dev2 + version: 0.0.0 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8a7b9ae2..bbbdb040 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: docker.io/perconalab/everest-operator - newTag: 0.6.0-dev2 + newTag: 0.0.0 diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index 1825f0ba..49ea973e 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -1448,7 +1448,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: docker.io/perconalab/everest-operator:0.6.0-dev2 + image: docker.io/perconalab/everest-operator:0.0.0 livenessProbe: httpGet: path: /healthz From abce134210d5c00760c102467c646757179323a7 Mon Sep 17 00:00:00 2001 From: Oksana Grishchenko Date: Wed, 27 Dec 2023 12:51:34 +0200 Subject: [PATCH 4/4] EVEREST-107 image tags update --- .github/workflows/build-push-images.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-push-images.yaml b/.github/workflows/build-push-images.yaml index 148e0757..86c2fe53 100644 --- a/.github/workflows/build-push-images.yaml +++ b/.github/workflows/build-push-images.yaml @@ -3,10 +3,9 @@ name: Build and Push images on: push: branches: - - 'release/v[0-9].[0-9]' + - main tags: - v* - workflow_dispatch: jobs: @@ -56,26 +55,24 @@ jobs: uses: docker/metadata-action@v4 with: images: | - percona/everest-operator,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, 'dev') }} + percona/everest-operator,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, 'rc') }} perconalab/everest-operator tags: | type=match,pattern=v(.*),group=1 - type=match,pattern=v(\d.\d),group=1,enable=${{ !contains(github.ref_name, 'dev') }} - type=raw,value=latest,enable=${{ !contains(github.ref_name, 'dev') }} - type=sha + type=match,pattern=v(\d.\d),group=1,enable=${{ !contains(github.ref_name, 'main') }} + type=raw,value=latest,enable=${{ !contains(github.ref_name, 'rc') }} - name: Docker bundle meta id: bundle_meta uses: docker/metadata-action@v4 with: images: | - percona/everest-operator-bundle,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, 'dev') }} + percona/everest-operator-bundle,enable=${{ github.ref_type == 'tag' && !contains(github.ref_name, 'rc') }} perconalab/everest-operator-bundle tags: | type=match,pattern=v(.*),group=1 - type=match,pattern=v(\d.\d),group=1,enable=${{ !contains(github.ref_name, 'dev') }} - type=raw,value=latest,enable=${{ !contains(github.ref_name, 'dev') }} - type=sha + type=match,pattern=v(\d.\d),group=1,enable=${{ !contains(github.ref_name, 'main') }} + type=raw,value=latest,enable=${{ !contains(github.ref_name, 'rc') }} - name: Login to GitHub Container Registry uses: docker/login-action@v2