From 9483a9a3b01c2245b7bd51b3b9d00b196e5efc71 Mon Sep 17 00:00:00 2001 From: Richard Watts Date: Wed, 28 Aug 2024 20:38:04 +0100 Subject: [PATCH] (feat) I _think_ this ships the nozq2 variant of the docs to zildev and production (but not staging). --- .github/workflows/cicd-stg.yml | 2 ++ Makefile | 10 +++++++--- cd/overlays/dev/kustomization.yaml | 14 ++++++++++++++ cd/overlays/production/kustomization.yaml | 7 +++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd-stg.yml b/.github/workflows/cicd-stg.yml index 639fc3d..6308eb6 100644 --- a/.github/workflows/cicd-stg.yml +++ b/.github/workflows/cicd-stg.yml @@ -70,6 +70,7 @@ jobs: env: ENVIRONMENT: stg IMAGE_TAG: ${{ steps.set-tag.outputs.tags }} + IMAGE_TAG_NOZQ2: ${{ steps.set-tag.outputs.tags }}-nozq2 run: | cd ${{ matrix.path }} make image/build-and-push @@ -79,6 +80,7 @@ jobs: env: ENVIRONMENT: stg IMAGE_TAG: "${{ env.REGISTRY }}/${{ matrix.image_name }}:latest" + IMAGE_TAG_NOZQ2: "${{ env.REGISTRY }}/${{ matrix.image_name }}-nozq2:latest" run: | cd ${{ matrix.path }} make image/build-and-push diff --git a/Makefile b/Makefile index b7c59f7..c28d3be 100644 --- a/Makefile +++ b/Makefile @@ -61,13 +61,17 @@ run-image: build run-image-nozq2: build docker run --rm -p 8080:80 "$(IMAGE_TAG_NOZQ2)" -STG_TAG=asia-docker.pkg.dev/prj-d-dev-apps-n3p4o97j/zilliqa/developer-portal +DEV_TAG=asia-docker.pkg.dev/prj-d-dev-apps-n3p4o97j/zilliqa/developer-portal +DEV_TAG_NOZQ2=$(DEV_TAG)-nozq2 ## Push to the dev repo so you can check that the docker container actually works .. push-dev-image: build - docker tag "${IMAGE_TAG}" "${STG_TAG}" - docker push "${STG_TAG}" + docker tag "${IMAGE_TAG}" "${DEV_TAG}:latest" + docker push "${DEV_TAG}" + docker tag "${IMAGE_TAG_NOZQ2}" "${DEV_TAG_NOZQ2}:latest" + docker push "${DEV_TAG_NOZQ2}" echo Now restart the pod .. ## Build and push the Docker image image/build-and-push: build docker push "$(IMAGE_TAG)" + docker push "$(IMAGE_TAG_NOZQ2)" diff --git a/cd/overlays/dev/kustomization.yaml b/cd/overlays/dev/kustomization.yaml index 8c55237..0890acf 100644 --- a/cd/overlays/dev/kustomization.yaml +++ b/cd/overlays/dev/kustomization.yaml @@ -6,6 +6,20 @@ resources: - certificate.yaml patches: + - target: + kind: BackendConfig + name: developer-portal + patch: |- + - op: replace + path: "/spec/healthCheck/requestPath" + value: "/" + - target: + kind: Deployment + name: developer-portal + patch: |- + - op: replace + path: "/spec/template/spec/containers/0/image" + value: asia-docker.pkg.dev/prj-d-dev-apps-n3p4o97j/zilliqa/developer-portal-nozq2:latest - target: kind: Ingress name: developer-portal diff --git a/cd/overlays/production/kustomization.yaml b/cd/overlays/production/kustomization.yaml index 997d497..bedc4a7 100644 --- a/cd/overlays/production/kustomization.yaml +++ b/cd/overlays/production/kustomization.yaml @@ -6,6 +6,13 @@ resources: - certificate.yaml patches: + - target: + kind: Deployment + name: developer-portal + patch: |- + - op: replace + path: "/spec/template/spec/containers/0/image" + value: developer-portal-nozq2 - target: kind: Ingress name: developer-portal