From a9c6687e4a7517a0eed0f7843551e0e7048ba886 Mon Sep 17 00:00:00 2001 From: Tom McKay Date: Thu, 15 Apr 2021 13:24:30 -0400 Subject: [PATCH] chore: prepare-release update csv (PROJQUAY-1486) --- .github/workflows/cut-release.yml | 20 ++++++++-------- .github/workflows/prepare-release.yml | 4 ++++ Makefile | 19 +++++++++++++++ .../quay-operator.clusterserviceversion.yaml | 23 ++++++++++--------- bundle/upstream/metadata/annotations.yaml | 4 ++-- 5 files changed, 47 insertions(+), 23 deletions(-) diff --git a/.github/workflows/cut-release.yml b/.github/workflows/cut-release.yml index 130fb1f11..18be988ee 100644 --- a/.github/workflows/cut-release.yml +++ b/.github/workflows/cut-release.yml @@ -100,13 +100,13 @@ jobs: id: download with: name: release - # - name: Build Release Container - # run: | - # d=$(mktemp -d) - # trap 'rm -rf "$d"' EXIT - # tar -xz -f ${{steps.download.outputs.download-path}}/release.tar.gz --strip-components=1 -C "$d" - # docker build --build-arg QUAY_VERSION --tag "${TAG}" "$d" - # - name: Publish Release Container - # run: | - # docker login -u "${QUAY_USER}" -p '${{ secrets.QUAY_TOKEN }}' quay.io - # docker push "${TAG}" + - name: Build Release Container + run: | + d=$(mktemp -d) + trap 'rm -rf "$d"' EXIT + tar -xz -f ${{steps.download.outputs.download-path}}/release.tar.gz --strip-components=1 -C "$d" + docker build --build-arg QUAY_VERSION --tag "${TAG}" "$d" + - name: Publish Release Container + run: | + docker login -u "${QUAY_USER}" -p '${{ secrets.QUAY_TOKEN }}' quay.io + docker push "${TAG}" diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index a3b64da01..4b4b5290d 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -34,6 +34,10 @@ jobs: chmod u+x /tmp/git-chglog echo "creating change log for tag: ${{ github.event.inputs.tag }}" /tmp/git-chglog --tag-filter-pattern "v3.*" -o CHANGELOG.md v3.6.0-alpha.2.. + - name: Version bundle + env: + RELEASE: ${{ github.event.inputs.tag }} + run: make prepare-release - name: Create Pull Request uses: peter-evans/create-pull-request@v3.5.1 with: diff --git a/Makefile b/Makefile index 5da22b5b1..f4a583406 100644 --- a/Makefile +++ b/Makefile @@ -78,3 +78,22 @@ CONTROLLER_GEN=$(GOBIN)/controller-gen else CONTROLLER_GEN=$(shell which controller-gen) endif + +# Same commands as in the prepare-release github action. When bumping to a new y-stream, update +# both this Makefile and the github action. +prepare-release: + sed -i "s/createdAt:.*/createdAt: `date --utc +'%Y-%m-%d %k:%m UTC'`/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/olm\.skipRange:.*/olm\.skipRange: \">=3.5.x <$(RELEASE)\"/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/quay-version:.*/quay-version: v$(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/containerImage:.*/containerImage: quay.io\/projectquay\/quay-operator:v$(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/^ name: quay-operator.*/ name: quay-operator.v$(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/image: quay.io\/projectquay\/quay-operator.*/image: quay.io\/projectquay\/quay-operator:v$(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/value: quay.io\/projectquay\/quay:.*/value: quay.io\/projectquay\/quay:v$(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml + sed -i "s/^ version: .*/ version: $(RELEASE)/" bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml +ifneq (,$(findstring alpha,$(RELEASE))) + sed -i "s/operators.operatorframework.io.bundle.channel.default.v1.*/operators.operatorframework.io.bundle.channel.default.v1: preview-3.6/" bundle/upstream/metadata/annotations.yaml + sed -i "s/operators.operatorframework.io.bundle.channels.v1.*/operators.operatorframework.io.bundle.channels.v1: preview-3.6/" bundle/upstream/metadata/annotations.yaml +else + sed -i "s/operators.operatorframework.io.bundle.channel.default.v1.*/operators.operatorframework.io.bundle.channel.default.v1: stable-3.6/" bundle/upstream/metadata/annotations.yaml + sed -i "s/operators.operatorframework.io.bundle.channels.v1.*/operators.operatorframework.io.bundle.channels.v1: stable-3.6/" bundle/upstream/metadata/annotations.yaml +endif diff --git a/bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml b/bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml index b1c663ce5..9c948b57d 100644 --- a/bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml +++ b/bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml @@ -2,12 +2,13 @@ apiVersion: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion metadata: annotations: + olm.skipRange: ">=3.5.x <3.6.0-alpha.3" capabilities: Full Lifecycle categories: Integration & Delivery - containerImage: quay.io/alecmerdler/quay-operator@sha256:338fd69768edebc1e4fe027b76d897281b1d95324d39e8afad6c790e38ecc4eb - createdAt: 2020-08-24 00:00:00 + containerImage: quay.io/projectquay/quay-operator:v3.6.0-alpha.3 + createdAt: 2021-04-15 19:04 UTC description: Opinionated deployment of Quay on Kubernetes. - quay-version: projectquay-v3.5.0 + quay-version: v3.6.0-alpha.3 repository: https://github.com/quay/quay-operator tectonic-visibility: ocs alm-examples: |- @@ -34,7 +35,7 @@ metadata: ] operators.operatorframework.io/internal-objects: |- ["quayecosystems.redhatcop.redhat.io"] - name: quay-operator.projectquay-v3.5.0 + name: quay-operator.v3.6.0-alpha.3 namespace: placeholder spec: customresourcedefinitions: @@ -125,7 +126,7 @@ spec: spec: containers: - name: quay-operator - image: quay.io/alecmerdler/quay-operator@sha256:338fd69768edebc1e4fe027b76d897281b1d95324d39e8afad6c790e38ecc4eb + image: quay.io/projectquay/quay-operator:v3.6.0-alpha.3 command: - /workspace/manager - '--namespace=$(WATCH_NAMESPACE)' @@ -149,9 +150,9 @@ spec: - name: QUAY_DEFAULT_BRANDING value: upstream - name: RELATED_IMAGE_COMPONENT_QUAY - value: quay.io/projectquay/quay@sha256:46334210eeb21aa6205215d1c4dbc40ea3381887c21a05d0bc47203c8f938987 + value: quay.io/projectquay/quay:v3.6.0-alpha.3 - name: RELATED_IMAGE_COMPONENT_CLAIR - value: quay.io/projectquay/clair@sha256:5fec3cf459159eabe2e4e1089687e25f638183a7e9bed1ecea8724e0597f8a14 + value: quay.io/projectquay/clair:4.0.4 - name: RELATED_IMAGE_COMPONENT_POSTGRES value: centos/postgresql-10-centos7@sha256:de1560cb35e5ec643e7b3a772ebaac8e3a7a2a8e8271d9e91ff023539b4dfb33 - name: RELATED_IMAGE_COMPONENT_REDIS @@ -608,17 +609,17 @@ spec: jwIeBTwKeBTwKOBRwKOARwGPAh4FPAp4FPAo4FHAo4BHAY8CHgU8CngU8CjgUcCjgEcBjwIeBTwK eBTwKOBRwKOARwGPAh4FPAp4FPAocGpR4P8D562jRcudh/kAAAAASUVORK5CYII= mediatype: image/png - maturity: alpha + maturity: stable links: - name: Source Code url: https://github.com/quay/quay-operator maintainers: - - email: quay-devel@redhat.com - name: Quay Engineering Team + - email: quay-sig@googlegroups.com + name: Project Quay Contributors provider: name: Red Hat selector: matchLabels: alm-owner-quay-operator: quay-operator operated-by: quay-operator - version: 3.5.0 + version: 3.6.0-alpha.3 diff --git a/bundle/upstream/metadata/annotations.yaml b/bundle/upstream/metadata/annotations.yaml index 0391c8776..fc4ebc965 100644 --- a/bundle/upstream/metadata/annotations.yaml +++ b/bundle/upstream/metadata/annotations.yaml @@ -1,6 +1,6 @@ annotations: - operators.operatorframework.io.bundle.channel.default.v1: projectquay-3.5 - operators.operatorframework.io.bundle.channels.v1: projectquay-3.5 + operators.operatorframework.io.bundle.channel.default.v1: preview-3.6 + operators.operatorframework.io.bundle.channels.v1: preview-3.6 operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.metadata.v1: metadata/