From 2f87a9a9f6818c8feb83f2b9617040f137f0fbb3 Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Fri, 19 Jun 2020 03:26:31 -0400 Subject: [PATCH] Update existing managed instance groups on deploy --- .github/workflows/push.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2f5d3db5..926a60f7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -73,12 +73,20 @@ jobs: # --description="Allow incoming Zcash traffic from anywhere" \ # Deploy managed instance group using the new instance template - - name: Deploy managed instance group + # - name: Deploy managed instance group + # run: | + # gcloud compute instance-groups managed create \ + # "zebrad-$SHORT_BRANCH_NAME-$SHA7" \ + # --template "zebrad-$SHORT_BRANCH_NAME-$SHA7" \ + # --health-check zebrad-tracing-filter \ + # --initial-delay 30 \ + # --region us-central1 \ + # --size 2 + + # Rolls out update to existing group using the new instance template + - name: Update managed instance group run: | - gcloud compute instance-groups managed create \ - "zebrad-$SHORT_BRANCH_NAME-$SHA7" \ - --template "zebrad-$SHORT_BRANCH_NAME-$SHA7" \ - --health-check zebrad-tracing-filter \ - --initial-delay 30 \ + gcloud compute instance-groups managed rolling-action start-update \ + "zebrad-$SHORT_BRANCH_NAME" \ + --version template="zebrad-$SHORT_BRANCH_NAME-$SHA7" \ --region us-central1 \ - --size 2