-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLIP-1832: Yifei test Terraform installation.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |