Skip to content

Commit

Permalink
Use proper image prefix when building (#7536)
Browse files Browse the repository at this point in the history
* Use proper image prefix when building

* 🤯
  • Loading branch information
flvndvd authored Sep 19, 2024
1 parent 545533f commit 0a1c555
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-and-test-front-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
IMAGE_NAME: front-qa

jobs:
build-and-deploy:
Expand Down Expand Up @@ -50,12 +51,12 @@ jobs:
- name: Build the image on Cloud Build
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh --image-name=front --dockerfile-path=./front/Dockerfile --working-dir=./
./k8s/cloud-build.sh --image-name=$IMAGE_NAME --dockerfile-path=./front/Dockerfile --working-dir=./
- name: Deploy the image on Kubernetes
run: |
chmod +x ./k8s/deploy-image.sh
./k8s/deploy-image.sh gcr.io/$GCLOUD_PROJECT_ID/front-image:${{ steps.short_sha.outputs.short_sha }} front-qa-deployment
./k8s/deploy-image.sh gcr.io/$GCLOUD_PROJECT_ID/$IMAGE_NAME:${{ steps.short_sha.outputs.short_sha }} front-qa-deployment
- name: Wait for rollout to complete
run: kubectl rollout status deployment/front-qa-deployment --timeout=10m
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deploy-front-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
IMAGE_NAME: front-edge

jobs:
build-and-deploy:
Expand Down Expand Up @@ -41,12 +42,12 @@ jobs:
- name: Build the image on Cloud Build
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh --image-name=front --dockerfile-path=./front/Dockerfile --working-dir=./
./k8s/cloud-build.sh --image-name=$IMAGE_NAME --dockerfile-path=./front/Dockerfile --working-dir=./
- name: Deploy the image on Kubernetes
run: |
chmod +x ./k8s/deploy-image.sh
./k8s/deploy-image.sh gcr.io/$GCLOUD_PROJECT_ID/front-image:${{ steps.short_sha.outputs.short_sha }} front-edge-deployment
./k8s/deploy-image.sh gcr.io/$GCLOUD_PROJECT_ID/$IMAGE_NAME:${{ steps.short_sha.outputs.short_sha }} front-edge-deployment
- name: Wait for rollout to complete
run: kubectl rollout status deployment/front-edge-deployment --timeout=10m
2 changes: 1 addition & 1 deletion k8s/deployments/front-edge-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
terminationGracePeriodSeconds: 60
containers:
- name: web
image: gcr.io/or1g1n-186209/front-image:latest
image: gcr.io/or1g1n-186209/front-edge-image:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
Expand Down
2 changes: 1 addition & 1 deletion k8s/deployments/front-qa-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
terminationGracePeriodSeconds: 60
containers:
- name: web
image: gcr.io/or1g1n-186209/front-image:latest
image: gcr.io/or1g1n-186209/front-qa-image:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
Expand Down

0 comments on commit 0a1c555

Please sign in to comment.