-
Notifications
You must be signed in to change notification settings - Fork 20
134 lines (134 loc) · 4.85 KB
/
terratest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#name: Terratest
#
#on:
# pull_request:
# branches:
# - 'master'
# push:
# branches:
# - "master"
#
#jobs:
# go-test-eu-de:
# name: Run Terratest for eu-de
# runs-on: ubuntu-latest
# container:
# image: vault
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Setup && Terratest eu-de
# shell: sh
# run: |
# ###### INSTALL TERRAFORM && GO ######
# apk update && apk add go wget zip
#
# wget -q https://releases.hashicorp.com/terraform/1.3.3/terraform_1.3.3_linux_amd64.zip
# unzip terraform_1.3.3_linux_amd64.zip && rm terraform_1.3.3_linux_amd64.zip
# mv terraform /usr/bin/terraform
#
# ###### WORKING DIRECTORY ######
# cd Terratest
#
# ###### VAULT LOGIN #####
# export VAULT_ADDR=${{ secrets.VAULT_ADDR }}
# export VAULT_ROLE_ID=${{ secrets.VAULT_ROLE_ID }}
# export VAULT_SECRET_ID=${{ secrets.VAULT_SECRET_ID }}
# export VAULT_TOKEN=$(vault write -field=token ${{ secrets.VAULT_TOKEN_PATH }} role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID) || true
#
# #### OTC CREDENTIALS #####
# export OS_DOMAIN_NAME=${{ secrets.OS_DOMAIN_NAME }}
# export OS_ACCESS_KEY=$(vault kv get --field access_key ${{ secrets.OS_KEY_PATH }})
# export OS_SECRET_KEY=$(vault kv get --field secret_key ${{ secrets.OS_KEY_PATH }})
#
# export TF_VAR_region="eu-de"
# export OS_AUTH_URL="https://iam.${TF_VAR_region}.otc.t-systems.com/v3"
# source .envrc
#
# ### download go modules
# go get -t ./...
#
# ### run go terratest
# go test -v -tags=unit -timeout 90m
# go-test-eu-nl:
# name: Run Terratest for eu-nl
# runs-on: ubuntu-latest
# container:
# image: vault
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Setup && Terratest eu-nl
# shell: sh
# run: |
# ###### INSTALL TERRAFORM && GO ######
# apk update && apk add go wget zip
#
# wget -q https://releases.hashicorp.com/terraform/1.3.3/terraform_1.3.3_linux_amd64.zip
# unzip terraform_1.3.3_linux_amd64.zip && rm terraform_1.3.3_linux_amd64.zip
# mv terraform /usr/bin/terraform
#
# ###### WORKING DIRECTORY ######
# cd Terratest
#
# ###### VAULT LOGIN #####
# export VAULT_ADDR=${{ secrets.VAULT_ADDR }}
# export VAULT_ROLE_ID=${{ secrets.VAULT_ROLE_ID }}
# export VAULT_SECRET_ID=${{ secrets.VAULT_SECRET_ID }}
# export VAULT_TOKEN=$(vault write -field=token ${{ secrets.VAULT_TOKEN_PATH }} role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID) || true
#
# #### OTC CREDENTIALS #####
# export OS_DOMAIN_NAME=${{ secrets.OS_DOMAIN_NAME }}
# export OS_ACCESS_KEY=$(vault kv get --field access_key ${{ secrets.OS_KEY_PATH }})
# export OS_SECRET_KEY=$(vault kv get --field secret_key ${{ secrets.OS_KEY_PATH }})
#
# export TF_VAR_region="eu-nl"
# export OS_AUTH_URL="https://iam.${TF_VAR_region}.otc.t-systems.com/v3"
# source .envrc
#
# ### download go modules
# go get -t ./...
#
# ### run go terratest
# go test -v -tags=unit -timeout 90m
# go-test-eu-ch2:
# name: Run Terratest for eu-ch2
# runs-on: ubuntu-latest
# container:
# image: vault
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Setup && Terratest eu-ch2
# shell: sh
# run: |
# ###### INSTALL TERRAFORM && GO ######
# apk update && apk add go wget zip
#
# wget -q https://releases.hashicorp.com/terraform/1.3.3/terraform_1.3.3_linux_amd64.zip
# unzip terraform_1.3.3_linux_amd64.zip && rm terraform_1.3.3_linux_amd64.zip
# mv terraform /usr/bin/terraform
#
# ###### WORKING DIRECTORY ######
# cd Terratest
#
# ###### VAULT LOGIN #####
# export VAULT_ADDR=${{ secrets.VAULT_ADDR }}
# export VAULT_ROLE_ID=${{ secrets.VAULT_ROLE_ID }}
# export VAULT_SECRET_ID=${{ secrets.VAULT_SECRET_ID }}
# export VAULT_TOKEN=$(vault write -field=token ${{ secrets.VAULT_TOKEN_PATH }} role_id=$VAULT_ROLE_ID secret_id=$VAULT_SECRET_ID) || true
#
# #### OTC CREDENTIALS #####
# export OS_DOMAIN_NAME=${{ secrets.SWISS_OS_DOMAIN_NAME }}
# export OS_ACCESS_KEY=$(vault kv get --field access_key secret/otc_credentials/swiss)
# export OS_SECRET_KEY=$(vault kv get --field secret_key secret/otc_credentials/swiss)
#
# export TF_VAR_region="eu-ch2"
# export OS_AUTH_URL="https://iam-pub.${TF_VAR_region}.sc.otc.t-systems.com/v3"
# source .envrc
#
# ### download go modules
# go get -t ./...
#
# ### run go terratest
# go test -v -tags=unit -timeout 90m