11.PHONY : build push manifest test verify-codegen charts
22TAG? =latest
3+ OWNER? =openfaas
4+ SERVER? =ghcr.io
5+ IMG_NAME? =inlets-operator
6+
37LDFLAGS := "-s -w -X github.com/inlets/inlets-operator/pkg/version.Release=$(Version ) -X github.com/inlets/inlets-operator/pkg/version.SHA=$(GitCommit ) "
48PLATFORM := "linux/amd64,linux/arm/v7,linux/arm64"
59
@@ -28,7 +32,6 @@ ${CODEGEN_PKG}: $(TOOLS_DIR)/code-generator.mod
2832 @echo " (re)installing k8s.io/code-generator-${CODEGEN_VERSION} "
2933 @cd $(TOOLS_DIR ) && go mod download -modfile=code-generator.mod
3034
31-
3235.PHONY : build-local
3336build-local :
3437 @docker buildx create --use --name=multiarch --node multiarch && \
@@ -37,45 +40,29 @@ build-local:
3740 --build-arg Version=$(Version ) --build-arg GitCommit=$(GitCommit ) \
3841 --platform linux/amd64 \
3942 --output " type=docker,push=false" \
40- --tag inlets/inlets-operator :$(Version ) .
43+ --tag $( SERVER ) / $( OWNER ) / $( IMG_NAME ) :$(Version ) .
4144
4245.PHONY : build
4346build :
44- @docker buildx create --use --name=multiarch --node multiarch && \
47+ @echo $(SERVER ) /$(OWNER ) /$(IMG_NAME ) :$(Version ) && \
48+ docker buildx create --use --name=multiarch --node multiarch && \
4549 docker buildx build \
4650 --progress=plain \
4751 --build-arg Version=$(Version ) --build-arg GitCommit=$(GitCommit ) \
4852 --platform $(PLATFORM ) \
4953 --output " type=image,push=false" \
50- --tag inlets/inlets-operator:$(Version ) .
51-
52- .PHONY : docker-login
53- docker-login :
54- echo -n " ${DOCKER_PASSWORD} " | docker login -u " ${DOCKER_USERNAME} " --password-stdin
55-
56- .PHONY : docker-login-ghcr
57- docker-login-ghcr :
58- echo -n " ${GHCR_PASSWORD} " | docker login -u " ${GHCR_USERNAME} " --password-stdin ghcr.io
54+ --tag $(SERVER ) /$(OWNER ) /$(IMG_NAME ) :$(Version ) .
5955
6056.PHONY : push
6157push :
62- @docker buildx create --use --name=multiarch --node multiarch && \
63- docker buildx build \
64- --progress=plain \
65- --build-arg Version=$(Version ) --build-arg GitCommit=$(GitCommit ) \
66- --platform $(PLATFORM ) \
67- --output " type=image,push=true" \
68- --tag inlets/inlets-operator:$(Version ) .
69-
70- .PHONY : push-ghcr
71- push-ghcr :
72- @docker buildx create --use --name=multiarch --node multiarch && \
58+ @echo $(SERVER ) /$(OWNER ) /$(IMG_NAME ) :$(Version ) && \
59+ docker buildx create --use --name=multiarch --node multiarch && \
7360 docker buildx build \
7461 --progress=plain \
7562 --build-arg Version=$(Version ) --build-arg GitCommit=$(GitCommit ) \
7663 --platform $(PLATFORM ) \
7764 --output " type=image,push=true" \
78- --tag ghcr.io/inlets/inlets-operator :$(Version ) .
65+ --tag $( SERVER ) / $( OWNER ) / $( IMG_NAME ) :$(Version ) .
7966
8067test :
8168 go test ./...
0 commit comments