Skip to content

Commit

Permalink
Merge pull request #433 from thomasmckay/1486-prepare-release-bundle
Browse files Browse the repository at this point in the history
chore: prepare-release update csv (PROJQUAY-1486)
  • Loading branch information
thomasmckay authored Apr 20, 2021
2 parents e66ebbe + a9c6687 commit 4f421cd
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 23 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
4 changes: 4 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 12 additions & 11 deletions bundle/upstream/manifests/quay-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |-
Expand All @@ -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:
Expand Down Expand Up @@ -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)'
Expand All @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions bundle/upstream/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -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/
Expand Down

0 comments on commit 4f421cd

Please sign in to comment.