Skip to content

Commit

Permalink
Add bundle creation addition
Browse files Browse the repository at this point in the history
Only when building the bundle container we set the containerImage and createdAt fields.
  • Loading branch information
razo7 committed Jan 30, 2023
1 parent 2bc9fea commit 5db0927
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
##@ Bundle Creation Addition
## Some addition to bundle creation in the bundle

.PHONY: bundle-update
bundle-update: ## Update containerImage, and createdAt fields in the bundle's CSV
sed -r -i "s|containerImage: .*|containerImage: $(IMG)|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml
sed -r -i "s|createdAt: .*|createdAt: `date '+%Y-%m-%d %T'`|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml
$(OPERATOR_SDK) bundle validate ./bundle

.PHONY: bundle-reset-date
bundle-reset-date: ## Reset bundle's createdAt
sed -r -i "s|createdAt: .*|createdAt: \"\"|;" ./bundle/manifests/$(OPERATOR_NAME).clusterserviceversion.yaml
Expand Down Expand Up @@ -270,7 +276,7 @@ bundle: manifests operator-sdk kustomize ## Generate bundle manifests and metada
$(OPERATOR_SDK) bundle validate ./bundle

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
bundle-build: bundle-update ## Build the bundle image.
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .

.PHONY: bundle-push
Expand Down

0 comments on commit 5db0927

Please sign in to comment.