|
11 | 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | | - |
15 | 14 | timeout: 3600s |
16 | 15 | steps: |
17 | 16 | - id: prepare |
18 | 17 | name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
19 | 18 | args: ['/bin/bash', '-c', 'mkdir -p ~/.terraform.d && ln -s /root/.terraform.d/plugins ~/.terraform.d/plugins && source /usr/local/bin/task_helper_functions.sh && prepare_environment'] |
20 | | - env: |
21 | | - - 'TF_VAR_org_id=$_ORG_ID' |
22 | | - - 'TF_VAR_folder_id=$_FOLDER_ID' |
23 | | - - 'TF_VAR_billing_account=$_BILLING_ACCOUNT' |
24 | | - - 'TF_VAR_gsuite_admin_email=project-factory-test-admin@test.infra.cft.tips' |
25 | | - - 'TF_VAR_gsuite_domain=test.infra.cft.tips' |
26 | | -- id: create |
| 19 | +- id: create minimal-local |
| 20 | + waitFor: |
| 21 | + - prepare |
27 | 22 | name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
28 | | - args: ['/bin/bash', '-c', 'ln -s /root/.terraform.d/plugins ~/.terraform.d/plugins && source /usr/local/bin/task_helper_functions.sh && kitchen_do create'] |
29 | | -- id: converge |
| 23 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create minimal-local'] |
| 24 | +- id: converge minimal-local |
| 25 | + waitFor: |
| 26 | + - create minimal-local |
30 | 27 | name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
31 | | - args: ['/bin/bash', '-c', 'ln -s /root/.terraform.d/plugins ~/.terraform.d/plugins && source /usr/local/bin/task_helper_functions.sh && export TF_VAR_policy_id=$(gcloud access-context-manager policies list --organization="${TF_VAR_org_id:?}" --format="value(name)") && kitchen_do converge'] |
| 28 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge minimal-local'] |
32 | 29 | env: |
33 | | - - 'TF_VAR_org_id=$_ORG_ID' |
34 | | - - 'TF_VAR_domain=test.infra.cft.tips.' |
35 | | -- id: verify |
| 30 | + - 'GCLOUD_TF_DOWNLOAD=always' |
| 31 | +- id: verify minimal-local |
| 32 | + waitFor: |
| 33 | + - converge minimal-local |
36 | 34 | name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
37 | | - args: ['/bin/bash', '-c', 'ln -s /root/.terraform.d/plugins ~/.terraform.d/plugins && source /usr/local/bin/task_helper_functions.sh && kitchen_do verify'] |
38 | | -- id: destroy |
| 35 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify minimal-local'] |
| 36 | +- id: destroy minimal-local |
| 37 | + waitFor: |
| 38 | + - verify minimal-local |
39 | 39 | name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
40 | | - args: ['/bin/bash', '-c', 'ln -s /root/.terraform.d/plugins ~/.terraform.d/plugins && source /usr/local/bin/task_helper_functions.sh && export TF_VAR_policy_id=$(gcloud access-context-manager policies list --organization="${TF_VAR_org_id:?}" --format="value(name)") && kitchen_do destroy'] |
| 40 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy minimal-local'] |
41 | 41 | env: |
42 | | - - 'TF_VAR_org_id=$_ORG_ID' |
43 | | - - 'TF_VAR_domain=test.infra.cft.tips.' |
| 42 | + - 'GCLOUD_TF_DOWNLOAD=always' |
| 43 | + |
| 44 | +- id: create fabric-project-local |
| 45 | + waitFor: |
| 46 | + - prepare |
| 47 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 48 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create fabric-project-local'] |
| 49 | +- id: converge fabric-project-local |
| 50 | + waitFor: |
| 51 | + - create fabric-project-local |
| 52 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 53 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge fabric-project-local'] |
| 54 | +- id: verify fabric-project-local |
| 55 | + waitFor: |
| 56 | + - converge fabric-project-local |
| 57 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 58 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify fabric-project-local'] |
| 59 | +- id: destroy fabric-project-local |
| 60 | + waitFor: |
| 61 | + - verify fabric-project-local |
| 62 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 63 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy fabric-project-local'] |
| 64 | + |
| 65 | +- id: create app-engine-local |
| 66 | + waitFor: |
| 67 | + - prepare |
| 68 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 69 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create app-engine-local'] |
| 70 | +- id: converge app-engine-local |
| 71 | + waitFor: |
| 72 | + - create app-engine-local |
| 73 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 74 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge app-engine-local'] |
| 75 | +- id: verify app-engine-local |
| 76 | + waitFor: |
| 77 | + - converge app-engine-local |
| 78 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 79 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify app-engine-local'] |
| 80 | +- id: destroy app-engine-local |
| 81 | + waitFor: |
| 82 | + - verify app-engine-local |
| 83 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 84 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy app-engine-local'] |
| 85 | + |
| 86 | +- id: create budget-local |
| 87 | + waitFor: |
| 88 | + - prepare |
| 89 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 90 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create budget-local'] |
| 91 | +- id: converge budget-local |
| 92 | + waitFor: |
| 93 | + - create budget-local |
| 94 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 95 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge budget-local'] |
| 96 | +- id: verify budget-local |
| 97 | + waitFor: |
| 98 | + - converge budget-local |
| 99 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 100 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify budget-local'] |
| 101 | +- id: destroy budget-local |
| 102 | + waitFor: |
| 103 | + - verify budget-local |
| 104 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 105 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy budget-local'] |
| 106 | + |
| 107 | +- id: create dynamic-shared-vpc-local |
| 108 | + waitFor: |
| 109 | + - prepare |
| 110 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 111 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create dynamic-shared-vpc-local'] |
| 112 | +- id: converge dynamic-shared-vpc-local |
| 113 | + waitFor: |
| 114 | + - create dynamic-shared-vpc-local |
| 115 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 116 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge dynamic-shared-vpc-local'] |
| 117 | +- id: verify dynamic-shared-vpc-local |
| 118 | + waitFor: |
| 119 | + - converge dynamic-shared-vpc-local |
| 120 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 121 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify dynamic-shared-vpc-local'] |
| 122 | +- id: destroy dynamic-shared-vpc-local |
| 123 | + waitFor: |
| 124 | + - verify dynamic-shared-vpc-local |
| 125 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 126 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy dynamic-shared-vpc-local'] |
| 127 | + |
| 128 | +- id: create vpc-sc-project-local |
| 129 | + waitFor: |
| 130 | + - prepare |
| 131 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 132 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create vpc-sc-project-local'] |
| 133 | +- id: converge vpc-sc-project-local |
| 134 | + waitFor: |
| 135 | + - create vpc-sc-project-local |
| 136 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 137 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && export TF_VAR_policy_id=$(gcloud access-context-manager policies list --organization="${TF_VAR_org_id:?}" --format="value(name)") && kitchen_do converge vpc-sc-project-local'] |
| 138 | +- id: verify vpc-sc-project-local |
| 139 | + waitFor: |
| 140 | + - converge vpc-sc-project-local |
| 141 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 142 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify vpc-sc-project-local'] |
| 143 | +- id: destroy vpc-sc-project-local |
| 144 | + waitFor: |
| 145 | + - verify vpc-sc-project-local |
| 146 | + name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS' |
| 147 | + args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && export TF_VAR_policy_id=$(gcloud access-context-manager policies list --organization="${TF_VAR_org_id:?}" --format="value(name)") && kitchen_do destroy vpc-sc-project-local'] |
44 | 148 | tags: |
45 | 149 | - 'ci' |
46 | 150 | - 'integration' |
47 | 151 | substitutions: |
48 | 152 | _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' |
49 | 153 | _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.0' |
| 154 | +options: |
| 155 | + machineType: 'N1_HIGHCPU_8' |
| 156 | + env: |
| 157 | + - 'TF_VAR_org_id=$_ORG_ID' |
| 158 | + - 'TF_VAR_folder_id=$_FOLDER_ID' |
| 159 | + - 'TF_VAR_billing_account=$_BILLING_ACCOUNT' |
| 160 | + - 'TF_VAR_gsuite_admin_email=project-factory-test-admin@test.infra.cft.tips' |
| 161 | + - 'TF_VAR_gsuite_domain=test.infra.cft.tips' |
| 162 | + - 'TF_VAR_domain=test.infra.cft.tips.' |
| 163 | + - 'GCLOUD_TF_DOWNLOAD=never' |
0 commit comments