Skip to content

Commit

Permalink
Add timestamp as suffix to the OpenStackVersion
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
stuggi authored and openshift-cherrypick-robot committed Dec 21, 2024
1 parent 2611a15 commit 8c3af4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.0.1

OPENSTACK_RELEASE_VERSION ?= $(VERSION)-$(shell date +%s)

# 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")
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
Expand Down Expand Up @@ -338,7 +340,9 @@ endif
.PHONY: bundle
bundle: build manifests kustomize operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
$(OPERATOR_SDK) generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
cd config/manager && \
$(KUSTOMIZE) edit set image controller=$(IMG) && \
$(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)\"}}]"
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
cp dependencies.yaml ./bundle/metadata
$(OPERATOR_SDK) bundle validate ./bundle
Expand Down
2 changes: 1 addition & 1 deletion hack/export_related_images.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

0 comments on commit 8c3af4e

Please sign in to comment.