Skip to content

Commit ffc51a8

Browse files
committed
Add timestamp as suffix to the OpenStackVersion
Right now when a PR merges, the build openstack-operator has the OpenStackVersion 0.0.1. Since they are all the same for each PR it is not possible to test updates. Lets add the seconds since the Epoch as a suffix so that we get a different OpenStackVersion with each operator build. Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
1 parent 4dd3ceb commit ffc51a8

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
66
VERSION ?= 0.0.1
77

8+
OPENSTACK_RELEASE_VERSION ?= $(VERSION)-$(shell date +%s)
9+
810
# CHANNELS define the bundle channels used in the bundle.
911
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
1012
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
@@ -338,7 +340,9 @@ endif
338340
.PHONY: bundle
339341
bundle: build manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
340342
$(OPERATOR_SDK) generate kustomize manifests -q
341-
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
343+
cd config/manager && \
344+
$(KUSTOMIZE) edit set image controller=$(IMG) && \
345+
$(KUSTOMIZE) edit add patch --kind Deployment --name controller-manager --namespace system --patch "[{\"op\": \"replace\", \"path\": \"/spec/template/spec/containers/0/env/0\", \"value\": {\"name\": \"OPENSTACK_RELEASE_VERSION\", \"value\": \"$(OPENSTACK_RELEASE_VERSION)\"}}]"
342346
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
343347
cp dependencies.yaml ./bundle/metadata
344348
$(OPERATOR_SDK) bundle validate ./bundle

hack/export_related_images.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
export OPENSTACK_RELEASE_VERSION=0.0.1
3+
export OPENSTACK_RELEASE_VERSION=0.0.1-$(date +%s)
44
export RELATED_IMAGE_OPENSTACK_CLIENT_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-openstackclient:current-podified
55
export RELATED_IMAGE_RABBITMQ_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-rabbitmq:current-podified
66
export RELATED_IMAGE_KEYSTONE_API_IMAGE_URL_DEFAULT=quay.io/podified-antelope-centos9/openstack-keystone:current-podified

0 commit comments

Comments
 (0)