Skip to content

Commit

Permalink
CLIP-1832: Yifei test Terraform installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhangat committed Oct 23, 2023
1 parent 53fbac4 commit a16267b
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/yifei-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Yifei Test Terraform installation
on:
push:
branches:
- main
paths-ignore: # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-ignoring-paths
- 'docs/**'
- '.atlassian/**'
- 'test/unittest**'
pull_request_target:
types: [ labeled ]
workflow_dispatch:

jobs:
test:
if: ${{ github.event.label.name == 'e2e' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
name: Yifei Test Terraform installation
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_DEFAULT_REGION: us-east-1
SLACK_WEBHOOK_URL_ALERTS: ${{ secrets.SLACK_WEBHOOK_URL_ALERTS }}
SLACK_WEBHOOK_URL_NOTIFICATIONS: ${{ secrets.SLACK_WEBHOOK_URL_NOTIFICATIONS }}
AWS_ADDITIONAL_ROLE: ${{ secrets.AWS_ADDITIONAL_ROLE }}
TF_VAR_bamboo_license: ${{ secrets.TF_VAR_BAMBOO_LICENSE }}
TF_VAR_confluence_license: ${{ secrets.TF_VAR_CONFLUENCE_LICENSE }}
TF_VAR_bitbucket_license: ${{ secrets.TF_VAR_BITBUCKET_LICENSE }}
TF_VAR_crowd_license: ${{ secrets.TF_VAR_CROWD_LICENSE }}
TF_VAR_bamboo_admin_password: ${{ secrets.TF_VAR_BAMBOO_ADMIN_PASSWORD }}
TF_VAR_crowd_admin_password: ${{ secrets.TF_VAR_CROWD_ADMIN_PASSWORD }}
TF_VAR_bitbucket_admin_password: ${{ secrets.TF_VAR_BITBUCKET_ADMIN_PASSWORD }}
TF_VAR_kinesis_log_producers_role_arns: ${{ secrets.TF_VAR_KINESIS_LOG_PRODUCERS_ROLE_ARNS }}
TF_VAR_osquery_fleet_enrollment_secret_name: ${{ secrets.TF_VAR_OSQUERY_FLEET_ENROLLMENT_SECRET_NAME }}
TF_VAR_osquery_fleet_enrollment_host: ${{ secrets.TF_VAR_OSQUERY_FLEET_ENROLLMENT_HOST }}
USE_DOMAIN: "false"

steps:
- name: Checkout
uses: actions/[email protected]
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 y | unzip /tmp/terraform.zip -d /usr/local/bin/
rm /tmp/terraform.zip
# check the latest version
terraform -version

0 comments on commit a16267b

Please sign in to comment.