From ff520e4e400d885e29a7d2da648db1808e47c6ac Mon Sep 17 00:00:00 2001 From: Abdullah Yildirim Date: Thu, 4 Jul 2024 15:09:18 +0000 Subject: [PATCH] chore: stop hard coding quay.io image registry (#134) Signed-off-by: a3hadi --- .github/workflows/build-push.yaml | 3 +-- pkg/mapper/examples/even_odd/Makefile | 7 ++++--- pkg/mapper/examples/flatmap/Makefile | 7 ++++--- pkg/mapper/examples/forward_message/Makefile | 7 ++++--- pkg/mapper/examples/retry/Makefile | 7 ++++--- pkg/mapper/examples/tickgen/Makefile | 7 ++++--- pkg/mapstreamer/examples/flatmap_stream/Makefile | 7 ++++--- pkg/reducer/examples/counter/Makefile | 7 ++++--- pkg/reducer/examples/sum/Makefile | 7 ++++--- pkg/reducestreamer/examples/counter/Makefile | 7 ++++--- pkg/reducestreamer/examples/sum/Makefile | 7 ++++--- pkg/sessionreducer/examples/counter/Makefile | 7 ++++--- pkg/sessionreducer/examples/sum/Makefile | 7 ++++--- pkg/sideinput/examples/map_sideinput/Makefile | 7 ++++--- pkg/sideinput/examples/map_sideinput/udf/Makefile | 7 ++++--- pkg/sideinput/examples/reduce_sideinput/Makefile | 7 ++++--- pkg/sideinput/examples/reduce_sideinput/udf/Makefile | 7 ++++--- pkg/sideinput/examples/sideinput_function/Makefile | 7 ++++--- pkg/sideinput/examples/simple_sideinput/Makefile | 7 ++++--- pkg/sideinput/examples/simple_sideinput/udf/Makefile | 7 ++++--- .../examples/simple_source_with_sideinput/Makefile | 7 ++++--- pkg/sideinput/examples/sink_sideinput/Makefile | 7 ++++--- pkg/sinker/examples/fallback/Makefile | 7 ++++--- pkg/sinker/examples/log/Makefile | 7 ++++--- pkg/sinker/examples/redis-sink/Makefile | 7 ++++--- pkg/sourcer/examples/simple_source/Makefile | 7 ++++--- pkg/sourcetransformer/examples/assign_event_time/Makefile | 7 ++++--- pkg/sourcetransformer/examples/event_time_filter/Makefile | 7 ++++--- 28 files changed, 109 insertions(+), 83 deletions(-) diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml index 0caefffa..4896f619 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push.yaml @@ -8,8 +8,7 @@ on: jobs: docker_publish: - # run it only on numaproj/numaflow-go repository - # forked repositories normally don't have the proper permission setup. + # run workflow only on numaproj/numaflow-go repository if: ${{ github.repository }} == "numaproj/numaflow-go" name: Build, Tag, and Push Image runs-on: ubuntu-latest diff --git a/pkg/mapper/examples/even_odd/Makefile b/pkg/mapper/examples/even_odd/Makefile index 048194ab..a570d49d 100644 --- a/pkg/mapper/examples/even_odd/Makefile +++ b/pkg/mapper/examples/even_odd/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-even-odd:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-even-odd:${TAG}" --platform linux/amd64,linux/arm64 --target even-odd . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target even-odd . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-even-odd:${TAG}" --target even-odd . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-even-odd:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target even-odd . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/flatmap/Makefile b/pkg/mapper/examples/flatmap/Makefile index c7cebf2c..2050bbba 100644 --- a/pkg/mapper/examples/flatmap/Makefile +++ b/pkg/mapper/examples/flatmap/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-flatmap:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-flatmap:${TAG}" --platform linux/amd64,linux/arm64 --target flatmap . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target flatmap . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-flatmap:${TAG}" --target flatmap . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-flatmap:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target flatmap . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/forward_message/Makefile b/pkg/mapper/examples/forward_message/Makefile index 8e82c0d0..ce0e1a00 100644 --- a/pkg/mapper/examples/forward_message/Makefile +++ b/pkg/mapper/examples/forward_message/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-forward-message:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-forward-message:${TAG}" --platform linux/amd64,linux/arm64 --target forward-message . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target forward-message . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-forward-message:${TAG}" --target forward-message . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-forward-message:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target forward-message . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/retry/Makefile b/pkg/mapper/examples/retry/Makefile index ab8a5a70..6d9d111a 100644 --- a/pkg/mapper/examples/retry/Makefile +++ b/pkg/mapper/examples/retry/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-retry:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-retry:${TAG}" --platform linux/amd64,linux/arm64 --target retry . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target retry . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-retry:${TAG}" --target map-retry . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-retry:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target map-retry . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/mapper/examples/tickgen/Makefile b/pkg/mapper/examples/tickgen/Makefile index 78c78fbd..f8960563 100644 --- a/pkg/mapper/examples/tickgen/Makefile +++ b/pkg/mapper/examples/tickgen/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-tickgen:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-tickgen:${TAG}" --platform linux/amd64,linux/arm64 --target tickgen . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target tickgen . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-tickgen:${TAG}" --target tickgen . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-tickgen:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target tickgen . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/mapstreamer/examples/flatmap_stream/Makefile b/pkg/mapstreamer/examples/flatmap_stream/Makefile index 18945ac4..a60a60b4 100644 --- a/pkg/mapstreamer/examples/flatmap_stream/Makefile +++ b/pkg/mapstreamer/examples/flatmap_stream/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-flatmap-stream:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-flatmap-stream:${TAG}" --platform linux/amd64,linux/arm64 --target flatmap_stream . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target flatmap_stream . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-flatmap-stream:${TAG}" --target flatmap_stream . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-flatmap-stream:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target flatmap_stream . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/reducer/examples/counter/Makefile b/pkg/reducer/examples/counter/Makefile index a30a6e61..314a42ed 100644 --- a/pkg/reducer/examples/counter/Makefile +++ b/pkg/reducer/examples/counter/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-counter:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-counter:${TAG}" --platform linux/amd64,linux/arm64 --target counter . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target counter . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-counter:${TAG}" --target counter . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-counter:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target counter . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/reducer/examples/sum/Makefile b/pkg/reducer/examples/sum/Makefile index 5e8b01bc..8ab394aa 100644 --- a/pkg/reducer/examples/sum/Makefile +++ b/pkg/reducer/examples/sum/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sum:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-sum:${TAG}" --platform linux/amd64,linux/arm64 --target sum . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sum . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-sum:${TAG}" --target sum . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-sum:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sum . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/reducestreamer/examples/counter/Makefile b/pkg/reducestreamer/examples/counter/Makefile index 471e33c0..904e6e0b 100644 --- a/pkg/reducestreamer/examples/counter/Makefile +++ b/pkg/reducestreamer/examples/counter/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-stream-counter:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-stream-counter:${TAG}" --platform linux/amd64,linux/arm64 --target counter . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target counter . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-stream-counter:${TAG}" --target counter . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-stream-counter:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target counter . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/reducestreamer/examples/sum/Makefile b/pkg/reducestreamer/examples/sum/Makefile index 150e291b..b21bdfcc 100644 --- a/pkg/reducestreamer/examples/sum/Makefile +++ b/pkg/reducestreamer/examples/sum/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-stream-sum:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-stream-sum:${TAG}" --platform linux/amd64,linux/arm64 --target sum . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sum . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-stream-sum:${TAG}" --target sum . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-stream-sum:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sum . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sessionreducer/examples/counter/Makefile b/pkg/sessionreducer/examples/counter/Makefile index 360b416c..a3db1644 100644 --- a/pkg/sessionreducer/examples/counter/Makefile +++ b/pkg/sessionreducer/examples/counter/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/session-counter:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/session-counter:${TAG}" --platform linux/amd64,linux/arm64 --target counter . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target counter . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/session-counter:${TAG}" --target counter . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/session-counter:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target counter . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sessionreducer/examples/sum/Makefile b/pkg/sessionreducer/examples/sum/Makefile index e421ef11..0e5165f2 100644 --- a/pkg/sessionreducer/examples/sum/Makefile +++ b/pkg/sessionreducer/examples/sum/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/session-sum:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/session-sum:${TAG}" --platform linux/amd64,linux/arm64 --target sum . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sum . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/session-sum:${TAG}" --target sum . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/session-sum:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sum . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/map_sideinput/Makefile b/pkg/sideinput/examples/map_sideinput/Makefile index 56fb208e..af336d1f 100644 --- a/pkg/sideinput/examples/map_sideinput/Makefile +++ b/pkg/sideinput/examples/map_sideinput/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-sideinput:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-sideinput:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-sideinput:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-sideinput:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/map_sideinput/udf/Makefile b/pkg/sideinput/examples/map_sideinput/udf/Makefile index f38019e7..a904bd3c 100644 --- a/pkg/sideinput/examples/map_sideinput/udf/Makefile +++ b/pkg/sideinput/examples/map_sideinput/udf/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-sideinput-udf:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/map-sideinput-udf:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput-udf . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput-udf . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/map-sideinput-udf:${TAG}" --target sideinput-udf . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/map-sideinput-udf:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput-udf . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/reduce_sideinput/Makefile b/pkg/sideinput/examples/reduce_sideinput/Makefile index 43d85e38..33f1df97 100644 --- a/pkg/sideinput/examples/reduce_sideinput/Makefile +++ b/pkg/sideinput/examples/reduce_sideinput/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sideinput:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-sideinput:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-sideinput:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-sideinput:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/reduce_sideinput/udf/Makefile b/pkg/sideinput/examples/reduce_sideinput/udf/Makefile index 12336203..5aec716b 100644 --- a/pkg/sideinput/examples/reduce_sideinput/udf/Makefile +++ b/pkg/sideinput/examples/reduce_sideinput/udf/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sideinput-udf:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/reduce-sideinput-udf:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput-udf . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput-udf . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/reduce-sideinput-udf:${TAG}" --target sideinput-udf . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/reduce-sideinput-udf:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput-udf . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/sideinput_function/Makefile b/pkg/sideinput/examples/sideinput_function/Makefile index c6187577..2a7e3af3 100644 --- a/pkg/sideinput/examples/sideinput_function/Makefile +++ b/pkg/sideinput/examples/sideinput_function/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/sideinput-function:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/sideinput-function:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/sideinput-function:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/sideinput-function:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/simple_sideinput/Makefile b/pkg/sideinput/examples/simple_sideinput/Makefile index 1f6173c9..25805b66 100644 --- a/pkg/sideinput/examples/simple_sideinput/Makefile +++ b/pkg/sideinput/examples/simple_sideinput/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/sideinput-example:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/sideinput-example:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/sideinput-example:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/sideinput-example:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/simple_sideinput/udf/Makefile b/pkg/sideinput/examples/simple_sideinput/udf/Makefile index 22c3ba60..16a1e0ae 100644 --- a/pkg/sideinput/examples/simple_sideinput/udf/Makefile +++ b/pkg/sideinput/examples/simple_sideinput/udf/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/udf-sideinput-example:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/udf-sideinput-example:${TAG}" --platform linux/amd64,linux/arm64 --target udf-sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target udf-sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/udf-sideinput-example:${TAG}" --target udf-sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/udf-sideinput-example:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target udf-sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/simple_source_with_sideinput/Makefile b/pkg/sideinput/examples/simple_source_with_sideinput/Makefile index 79c631e6..9d708bf1 100644 --- a/pkg/sideinput/examples/simple_source_with_sideinput/Makefile +++ b/pkg/sideinput/examples/simple_source_with_sideinput/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/simple-source-with-sideinput:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/simple-source-with-sideinput:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/simple-source-with-sideinput:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/simple-source-with-sideinput:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sideinput/examples/sink_sideinput/Makefile b/pkg/sideinput/examples/sink_sideinput/Makefile index 9bc0c3d5..3a11d6ad 100644 --- a/pkg/sideinput/examples/sink_sideinput/Makefile +++ b/pkg/sideinput/examples/sink_sideinput/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/redis-sink-with-sideinput:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/redis-sink-with-sideinput:${TAG}" --platform linux/amd64,linux/arm64 --target sideinput . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target sideinput . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/redis-sink-with-sideinput:${TAG}" --target sideinput . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/redis-sink-with-sideinput:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target sideinput . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sinker/examples/fallback/Makefile b/pkg/sinker/examples/fallback/Makefile index 1cdc7dda..2e724ecd 100644 --- a/pkg/sinker/examples/fallback/Makefile +++ b/pkg/sinker/examples/fallback/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/fb-sink-log:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/fb-sink-log:${TAG}" --platform linux/amd64,linux/arm64 --target fallback . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target fallback . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/fb-sink-log:${TAG}" --target fallback . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/fb-sink-log:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target fallback . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sinker/examples/log/Makefile b/pkg/sinker/examples/log/Makefile index e94cbff6..15248aa5 100644 --- a/pkg/sinker/examples/log/Makefile +++ b/pkg/sinker/examples/log/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/sink-log:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/sink-log:${TAG}" --platform linux/amd64,linux/arm64 --target log . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target log . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/sink-log:${TAG}" --target log . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/sink-log:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target log . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sinker/examples/redis-sink/Makefile b/pkg/sinker/examples/redis-sink/Makefile index 1d26a234..c58383b7 100644 --- a/pkg/sinker/examples/redis-sink/Makefile +++ b/pkg/sinker/examples/redis-sink/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = "quay.io/numaio/numaflow-go/redis-sink:${TAG}" .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/redis-sink:${TAG}" --platform linux/amd64,linux/arm64 --target redis . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target redis . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/redis-sink:${TAG}" --target redis . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/redis-sink:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target redis . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sourcer/examples/simple_source/Makefile b/pkg/sourcer/examples/simple_source/Makefile index 47d803e5..2f37e477 100644 --- a/pkg/sourcer/examples/simple_source/Makefile +++ b/pkg/sourcer/examples/simple_source/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/source-simple-source:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/source-simple-source:${TAG}" --platform linux/amd64,linux/arm64 --target simple-source . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target simple-source . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/source-simple-source:${TAG}" --target simple-source . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/source-simple-source:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target simple-source . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sourcetransformer/examples/assign_event_time/Makefile b/pkg/sourcetransformer/examples/assign_event_time/Makefile index 969afea4..0cecf068 100644 --- a/pkg/sourcetransformer/examples/assign_event_time/Makefile +++ b/pkg/sourcetransformer/examples/assign_event_time/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/mapt-assign-event-time:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/mapt-assign-event-time:${TAG}" --platform linux/amd64,linux/arm64 --target assign-event-time . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target assign-event-time . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/mapt-assign-event-time:${TAG}" --target assign-event-time . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/mapt-assign-event-time:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target assign-event-time . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist diff --git a/pkg/sourcetransformer/examples/event_time_filter/Makefile b/pkg/sourcetransformer/examples/event_time_filter/Makefile index b8e2c21f..1e03c89f 100644 --- a/pkg/sourcetransformer/examples/event_time_filter/Makefile +++ b/pkg/sourcetransformer/examples/event_time_filter/Makefile @@ -1,5 +1,6 @@ TAG ?= stable PUSH ?= false +IMAGE_REGISTRY = quay.io/numaio/numaflow-go/mapt-event-time-filter:${TAG} .PHONY: build build: @@ -7,12 +8,12 @@ build: .PHONY: image-push image-push: build - docker buildx build -t "quay.io/numaio/numaflow-go/mapt-event-time-filter:${TAG}" --platform linux/amd64,linux/arm64 --target event-time-filter . --push + docker buildx build -t ${IMAGE_REGISTRY} --platform linux/amd64,linux/arm64 --target event-time-filter . --push .PHONY: image image: build - docker build -t "quay.io/numaio/numaflow-go/mapt-event-time-filter:${TAG}" --target event-time-filter . - @if [ "$(PUSH)" = "true" ]; then docker push "quay.io/numaio/numaflow-go/mapt-event-time-filter:${TAG}"; fi + docker build -t ${IMAGE_REGISTRY} --target event-time-filter . + @if [ "$(PUSH)" = "true" ]; then docker push ${IMAGE_REGISTRY}; fi clean: -rm -rf ./dist