Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: stop hard coding quay.io image registry #134

Merged
merged 2 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions pkg/mapper/examples/even_odd/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-even-odd:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/even-odd-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/mapper/examples/flatmap/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-flatmap:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/flatmap-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/mapper/examples/forward_message/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-forward-message:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/forward-message-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/mapper/examples/retry/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-retry:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/retry main.go

.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
7 changes: 4 additions & 3 deletions pkg/mapper/examples/tickgen/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-tickgen:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/tickgen-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/mapstreamer/examples/flatmap_stream/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-flatmap-stream:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/flatmap-stream-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/reducer/examples/counter/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-counter:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/counter-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/reducer/examples/sum/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sum:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/sum-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/reducestreamer/examples/counter/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-stream-counter:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/counter-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/reducestreamer/examples/sum/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-stream-sum:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/sum-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/sessionreducer/examples/counter/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/session-counter:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/counter-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/sessionreducer/examples/sum/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/session-sum:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/sum-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/sideinput/examples/map_sideinput/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-sideinput:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/map-sideinput-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/sideinput/examples/map_sideinput/udf/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/map-sideinput-udf:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/map-sideinput-udf main.go

.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
7 changes: 4 additions & 3 deletions pkg/sideinput/examples/reduce_sideinput/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sideinput:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/reduce-sideinput-example main.go

.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
7 changes: 4 additions & 3 deletions pkg/sideinput/examples/reduce_sideinput/udf/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
TAG ?= stable
PUSH ?= false
IMAGE_REGISTRY = quay.io/numaio/numaflow-go/reduce-sideinput-udf:${TAG}

.PHONY: build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o ./dist/reduce-sideinput-udf main.go

.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
Loading
Loading