Skip to content

Commit 218f94f

Browse files
committed
Add image build and push make targets
Add the docker-build and docker-push make targets to build and push container images. These follow the same pattern as the operators, it's basically a direct copy from telemetry-operator's Makefile except for the image name. This is useful to have a unified way for building images to be later used in the CI.
1 parent 534226f commit 218f94f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ BRANCH=$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
2222
PACKIT_RPM := ./rpm
2323
PACKIT_PREP = ./prepare_sources_result
2424

25+
IMG ?= quay.io/openstack-k8s-operators/prometheus-podman-exporter:latest
26+
2527
#=================================================
2628
# Build binary, clean, install and uninstall
2729
#=================================================
@@ -189,3 +191,16 @@ help: ## Print listing of key targets with their descriptions
189191
@$(_HLP_TGTS_CMD) | sort | \
190192
awk 'BEGIN {FS = ":(.*)?## "}; \
191193
{printf $(_HLPFMT), $$1, $$2}'
194+
195+
#=================================================
196+
# Container image targets
197+
#=================================================
198+
199+
.PHONY: docker-build
200+
docker-build: ## Build container image
201+
podman build -t ${IMG} -f Containerfile .
202+
203+
.PHONY: docker-push
204+
docker-push: ## Push container image
205+
podman push ${IMG}
206+

0 commit comments

Comments
 (0)