From 96771987c524ca5433acf791b9b43e6982fb18ea Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Mon, 23 Oct 2023 17:33:32 +1100 Subject: [PATCH] CLIP-1832: Install the latest Terraform on runner container. (#342) Co-authored-by: Yifei Zhang --- .github/workflows/e2e-test-no-domain.yaml | 12 ++++++++++++ .github/workflows/e2e-test-with-domain.yaml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/e2e-test-no-domain.yaml b/.github/workflows/e2e-test-no-domain.yaml index cdf9f4ea..6cba53b5 100644 --- a/.github/workflows/e2e-test-no-domain.yaml +++ b/.github/workflows/e2e-test-no-domain.yaml @@ -44,6 +44,18 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Install the latest Terraform + run: | + # check existing version + terraform -version + # download the latest + URL=$(curl -fsSL https://api.releases.hashicorp.com/v1/releases/terraform/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') + curl -s -o /tmp/terraform.zip ${URL} + echo yes | unzip /tmp/terraform.zip -d /usr/local/bin/ + rm /tmp/terraform.zip + # check the latest version + terraform -version + - name: Pin Kubectl version uses: azure/setup-kubectl@v3.0 with: diff --git a/.github/workflows/e2e-test-with-domain.yaml b/.github/workflows/e2e-test-with-domain.yaml index 21a49a39..13fedadb 100644 --- a/.github/workflows/e2e-test-with-domain.yaml +++ b/.github/workflows/e2e-test-with-domain.yaml @@ -44,6 +44,18 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Install the latest Terraform + run: | + # check existing version + terraform -version + # download the latest + URL=$(curl -fsSL https://api.releases.hashicorp.com/v1/releases/terraform/latest | jq -r '.builds[] | select((.arch=="amd64") and (.os=="linux")).url') + curl -s -o /tmp/terraform.zip ${URL} + echo yes | unzip /tmp/terraform.zip -d /usr/local/bin/ + rm /tmp/terraform.zip + # check the latest version + terraform -version + - name: Pin Kubectl version uses: azure/setup-kubectl@v2.0 with: