Skip to content

Commit 6055f4b

Browse files
Deploy backend-listen on GKE in pipeline (#2407)
1 parent e016ea0 commit 6055f4b

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

.github/workflows/gcp_backend.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,16 @@ jobs:
8484
region: ${{ env.REGION }}
8585
image: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}
8686

87-
- name: Deploy ${{ env.SERVICE }}-listen to Cloud Run
88-
id: deploy-backend-listen
89-
uses: google-github-actions/deploy-cloudrun@v2
90-
with:
91-
service: ${{ env.SERVICE }}-listen
92-
region: ${{ env.REGION }}
93-
image: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}
87+
- name: Connect to GKE cluster
88+
run: |
89+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
90+
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
91+
sudo apt-get update && sudo apt-get install google-cloud-cli-gke-gcloud-auth-plugin -y
92+
gcloud container clusters get-credentials ${{ vars.GKE_CLUSTER }} --region ${{ env.REGION }} --project ${{ vars.GCP_PROJECT_ID }}
93+
94+
- name: Deploy ${{ env.SERVICE }}-listen to GKE
95+
run: |
96+
kubectl -n ${{ vars.ENV }}-omi-backend rollout restart deploy ${{ vars.ENV }}-omi-backend-listen
9497
9598
- name: Deploy ${{ env.SERVICE }}-integration to Cloud Run
9699
id: deploy-backend-integration

backend/charts/backend-listen/dev_omi_backend_listen_values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ replicaCount: 1
99
image:
1010
repository: gcr.io/based-hardware-dev/backend
1111
# This sets the pull policy for images.
12-
pullPolicy: IfNotPresent
12+
pullPolicy: Always
1313
# Overrides the image tag whose default is the chart appVersion.
1414
tag: "latest"
1515

0 commit comments

Comments
 (0)