Skip to content

Commit

Permalink
ci: use standard tags for native images
Browse files Browse the repository at this point in the history
  • Loading branch information
jsenko committed Jun 26, 2024
1 parent 7db3c23 commit 9a53b48
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
- name: Build Native Images
env:
IMAGE_REPO: quay.io
IMAGE_TAG: latest-snapshot
IMAGE_TAG: 2.5.x-snapshot
run: |
make build-mem-native-image
Expand All @@ -296,7 +296,7 @@ jobs:
- name: Push Native Images
env:
IMAGE_REPO: quay.io
IMAGE_TAG: latest-snapshot
IMAGE_TAG: 2.5.x-snapshot
if: github.event_name == 'push'
run: |
make push-mem-native-image
Expand Down Expand Up @@ -393,7 +393,7 @@ jobs:
- name: Build Native Images
env:
IMAGE_REPO: quay.io
IMAGE_TAG: latest-snapshot
IMAGE_TAG: 2.5.x-snapshot
run: |
make build-sql-native-image
Expand All @@ -404,7 +404,7 @@ jobs:
- name: Push Native Images
env:
IMAGE_REPO: quay.io
IMAGE_TAG: latest-snapshot
IMAGE_TAG: 2.5.x-snapshot
if: github.event_name == 'push'
run: |
make push-sql-native-image
Expand Down
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ build-mem-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(IMAGE_TAG) app/
ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Creating additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker tag $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(IMAGE_TAG) $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: build-mem-native-scratch-image ## Builds native docker image from scratch for 'mem' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-mem-native-scratch-image:
Expand Down Expand Up @@ -161,7 +165,10 @@ push-mem-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(IMAGE_TAG)

ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Pushing additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-mem-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: build-sql-image ## Builds docker image for 'sql' storage variant. Variables available for override [SQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-sql-image:
Expand Down Expand Up @@ -189,6 +196,10 @@ build-sql-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(IMAGE_TAG) storage/sql
ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Creating additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker tag $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(IMAGE_TAG) $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: push-sql-native-image ## Pushes native docker image for 'sql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-sql-native-image:
Expand All @@ -198,6 +209,10 @@ push-sql-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(IMAGE_TAG)
ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Pushing additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-sql-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: build-mssql-image ## Builds docker image for 'mssql' storage variant. Variables available for override [MSSQL_DOCKERFILE, IMAGE_REPO, IMAGE_TAG, DOCKER_BUILD_WORKSPACE]
build-mssql-image:
Expand Down Expand Up @@ -261,6 +276,10 @@ build-kafkasql-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker build -f $(DOCKERFILE_LOCATION)/Dockerfile.native -t $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(IMAGE_TAG) storage/kafkasql
ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Creating additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker tag $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(IMAGE_TAG) $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: push-kafkasql-native-image ## Pushes native docker image for 'kafkasql' storage variant. Variables available for override [IMAGE_REPO, IMAGE_TAG]
push-kafkasql-native-image:
Expand All @@ -270,6 +289,10 @@ push-kafkasql-native-image:
@echo " Tag: $(IMAGE_TAG)"
@echo "------------------------------------------------------------------------"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(IMAGE_TAG)
ifneq ($(ADDITIONAL_IMAGE_TAG), none)
@echo "Pushing additional tag: $(ADDITIONAL_IMAGE_TAG)"
docker push $(IMAGE_REPO)/$(IMAGE_GROUP)/apicurio-registry-kafkasql-native:$(ADDITIONAL_IMAGE_TAG)
endif

.PHONY: build-all-images ## Builds all the Images. Variables available for override [IMAGE_REPO, IMAGE_TAG]
build-all-images: build-mem-image build-sql-image build-mssql-image build-kafkasql-image build-mysql-image
Expand Down

0 comments on commit 9a53b48

Please sign in to comment.