Skip to content

Commit

Permalink
change docker command to get image digest
Browse files Browse the repository at this point in the history
Signed-off-by: laminar <[email protected]>
  • Loading branch information
tpiperatgod committed Feb 24, 2023
1 parent c4f3c7e commit 38c4a6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ endef
.PHONY: redhat-certificated-bundle
redhat-certificated-bundle: yq kustomize manifests
operator-sdk generate kustomize manifests -q
cd config/manager && $(KUSTOMIZE) edit set image controller=$(shell docker images --digests --format "{{.Repository}}@{{.Digest}}" $(OPERATOR_IMG))
cd config/manager && $(KUSTOMIZE) edit set image controller=$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r)
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
$(YQ) eval -i ".metadata.annotations.\"olm.skipRange\" = \"<$(VERSION)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.\"olm.properties\" = ([{\"type\": \"olm.maxOpenShiftVersion\", \"value\": \"4.11\"}] | @json)" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.createdAt = \"$(BUILD_DATETIME)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.containerImage = \"$(shell docker images --digests --format "{{.Repository}}@{{.Digest}}" $(OPERATOR_IMG))\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i ".metadata.annotations.containerImage = \"$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
$(YQ) eval -i '.annotations += {"operators.operatorframework.io.bundle.channel.default.v1":"alpha"}' bundle/metadata/annotations.yaml
IMG_DIGIEST=$(shell docker images --digests --format "{{.Repository}}@{{.Digest}}" $(OPERATOR_IMG)) hack/postprocess-bundle.sh
IMG_DIGIEST=$(shell docker inspect --format='{{json .RepoDigests}}' $(OPERATOR_IMG) | jq --arg IMAGE_TAG_BASE "$(IMAGE_TAG_BASE)" -c '.[] | select(index($$IMAGE_TAG_BASE))' -r) hack/postprocess-bundle.sh
operator-sdk bundle validate ./bundle --select-optional name=operatorhub
operator-sdk bundle validate ./bundle --select-optional suite=operatorframework

Expand Down

0 comments on commit 38c4a6e

Please sign in to comment.