Skip to content

Commit

Permalink
Merge pull request #95 from sustainable-computing-io/containertool
Browse files Browse the repository at this point in the history
use CONTAINER_TOOL specification throughout
  • Loading branch information
trent-s authored Apr 16, 2024
2 parents 285fb6b + 6561766 commit eaf0ba3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ define docker_push
set -eu ;\
img="$(1)" ;\
tags="$(2)" ;\
echo "docker push $$img and additional tags: '$$tags'" ;\
echo "$(CONTAINER_TOOL) push $$img and additional tags: '$$tags'" ;\
\
img_path=$${img%:*} ;\
docker push $$img ;\
$(CONTAINER_TOOL) push $$img ;\
for tag in $$(echo $$tags | tr -s , ' ' ); do \
docker push $$img_path:$$tag ;\
$(CONTAINER_TOOL) push $$img_path:$$tag ;\
done \
}
endef
Expand All @@ -158,7 +158,7 @@ endef
.PHONY: operator-build
operator-build: manifests generate test ## Build docker image with the manager.
go mod tidy
docker build -t $(OPERATOR_IMG) \
$(CONTAINER_TOOL) build -t $(OPERATOR_IMG) \
--build-arg TARGETOS=$(GOOS) \
--build-arg TARGETARCH=$(GOARCH) \
--platform=linux/$(GOARCH) .
Expand Down Expand Up @@ -274,7 +274,7 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
docker build -f bundle.Dockerfile \
$(CONTAINER_TOOL) build -f bundle.Dockerfile \
-t $(BUNDLE_IMG) \
--platform=linux/$(GOARCH) .
$(call docker_tag,$(BUNDLE_IMG))
Expand Down Expand Up @@ -319,7 +319,7 @@ endif
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
.PHONY: catalog-build
catalog-build: opm ## Build a catalog image.
$(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
$(OPM) index add --container-tool $(CONTAINER_TOOL) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)

# Push the catalog image.
.PHONY: catalog-push
Expand Down

0 comments on commit eaf0ba3

Please sign in to comment.