diff --git a/Makefile b/Makefile index a2dcbcb06..ce6883e9b 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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 diff --git a/hack/export_related_images.sh b/hack/export_related_images.sh index 6b9045d11..b025b130a 100755 --- a/hack/export_related_images.sh +++ b/hack/export_related_images.sh @@ -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