1
1
2
+ IMAGE ?= localhost/postgres-operator:latest
2
3
PGMONITOR_DIR ?= hack/tools/pgmonitor
3
4
PGMONITOR_VERSION ?= v5.2.1
4
5
QUERIES_CONFIG_DIR ?= hack/tools/queries
@@ -44,7 +45,7 @@ notes: ## List known issues and future considerations
44
45
.PHONY : clean
45
46
clean : # # Clean resources
46
47
clean : clean-deprecated
47
- rm -f bin/postgres-operator
48
+ rm -f bin/postgres-operator image.tar
48
49
rm -rf licenses/* /
49
50
[ ! -d testing/kuttl/e2e-generated ] || rm -r testing/kuttl/e2e-generated
50
51
[ ! -d hack/tools/envtest ] || { chmod -R u+w hack/tools/envtest && rm -r hack/tools/envtest; }
@@ -133,7 +134,7 @@ deploy-dev: createnamespaces
133
134
134
135
.PHONY : build
135
136
build : # # Build a postgres-operator image
136
- $(BUILDAH ) build --tag localhost/postgres-operator \
137
+ $(BUILDAH ) build --tag ' $(IMAGE) ' \
137
138
--label org.opencontainers.image.authors=' Crunchy Data' \
138
139
--label org.opencontainers.image.description=' Crunchy PostgreSQL Operator' \
139
140
--label org.opencontainers.image.revision=' $(shell git rev-parse HEAD)' \
@@ -146,7 +147,11 @@ build-kind: image.tar ; $(or $(KIND),kind) load image-archive $<
146
147
build-minikube : image.tar ; $(or $(MINIKUBE ) ,minikube) image load $<
147
148
148
149
image.tar : build
149
- $(BUILDAH ) push localhost/postgres-operator oci-archive:$@ :localhost/postgres-operator:latest
150
+ set -x && \
151
+ case ' $(BUILDAH)' in \
152
+ ' docker' ) docker image save ' --output=$@' ' $(IMAGE)' ;; \
153
+ * ) $(BUILDAH ) push ' $(IMAGE)' ' oci-archive:$@:$(IMAGE)' ;; \
154
+ esac
150
155
151
156
# #@ Test
152
157
0 commit comments