|
| 1 | +jobs: |
| 2 | + - name: deploy-deploy-bucket |
| 3 | + plan: |
| 4 | + - aggregate: |
| 5 | + - get: this-module |
| 6 | + trigger: true |
| 7 | + - task: inject-secrets |
| 8 | + params: |
| 9 | + directory: deploy-bucket |
| 10 | + AWS_ACCOUNT_ID: ((telia-divx-common-services-stage-account-id)) |
| 11 | + KMS_KEY_ID: ((telia-divx-common-services-stage-state-bucket-key)) |
| 12 | + file: this-module/.ci/tasks/inject-secrets/task.yml |
| 13 | + input_mapping: {source: this-module} |
| 14 | + output_mapping: {secret-source: source} |
| 15 | + - task: apply |
| 16 | + params: |
| 17 | + directory: deploy-bucket |
| 18 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 19 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 20 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 21 | + file: this-module/.ci/tasks/apply/task.yml |
| 22 | + output_mapping: {terraform-out: deploy-bucket-terraform-out} |
| 23 | + - task: build-lambdas |
| 24 | + file: this-module/.ci/tasks/build_lambdas/task.yml |
| 25 | + input_mapping: {source: this-module} |
| 26 | + - task: deploy-lambdas |
| 27 | + params: |
| 28 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 29 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 30 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 31 | + file: this-module/.ci/tasks/deploy-lambdas/task.yml |
| 32 | + |
| 33 | + - name: test-default |
| 34 | + plan: |
| 35 | + - aggregate: |
| 36 | + - get: this-module |
| 37 | + trigger: true |
| 38 | + passed: |
| 39 | + - deploy-deploy-bucket |
| 40 | + - task: inject-secrets |
| 41 | + params: |
| 42 | + directory: default |
| 43 | + AWS_ACCOUNT_ID: ((telia-divx-common-services-stage-account-id)) |
| 44 | + KMS_KEY_ID: ((telia-divx-common-services-stage-state-bucket-key)) |
| 45 | + file: this-module/.ci/tasks/inject-secrets/task.yml |
| 46 | + input_mapping: {source: this-module} |
| 47 | + output_mapping: {secret-source: source} |
| 48 | + - task: apply |
| 49 | + params: |
| 50 | + directory: default |
| 51 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 52 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 53 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 54 | + file: this-module/.ci/tasks/apply/task.yml |
| 55 | + - task: test |
| 56 | + params: |
| 57 | + directory: default |
| 58 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 59 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 60 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 61 | + file: this-module/.ci/tasks/test/task.yml |
| 62 | + - task: destroy |
| 63 | + params: |
| 64 | + directory: default |
| 65 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 66 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 67 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 68 | + file: this-module/.ci/tasks/destroy/task.yml |
| 69 | + |
| 70 | + - name: test-report-forwarding |
| 71 | + plan: |
| 72 | + - aggregate: |
| 73 | + - get: this-module |
| 74 | + trigger: true |
| 75 | + passed: |
| 76 | + - test-default |
| 77 | + - task: inject-secrets |
| 78 | + params: |
| 79 | + directory: report-forwarding |
| 80 | + AWS_ACCOUNT_ID: ((telia-divx-common-services-stage-account-id)) |
| 81 | + KMS_KEY_ID: ((telia-divx-common-services-stage-state-bucket-key)) |
| 82 | + file: this-module/.ci/tasks/inject-secrets/task.yml |
| 83 | + input_mapping: {source: this-module} |
| 84 | + output_mapping: {secret-source: source} |
| 85 | + - task: apply |
| 86 | + params: |
| 87 | + directory: report-forwarding |
| 88 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 89 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 90 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 91 | + file: this-module/.ci/tasks/apply/task.yml |
| 92 | + - task: test |
| 93 | + params: |
| 94 | + directory: report-forwarding |
| 95 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 96 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 97 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 98 | + file: this-module/.ci/tasks/test/task.yml |
| 99 | + - task: destroy |
| 100 | + params: |
| 101 | + directory: report-forwarding |
| 102 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 103 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 104 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 105 | + file: this-module/.ci/tasks/destroy/task.yml |
| 106 | + |
| 107 | + - name: destroy-deploy-bucket |
| 108 | + plan: |
| 109 | + - aggregate: |
| 110 | + - get: this-module |
| 111 | + trigger: true |
| 112 | + passed: |
| 113 | + - test-report-forwarding |
| 114 | + - task: inject-secrets |
| 115 | + params: |
| 116 | + directory: deploy-bucket |
| 117 | + AWS_ACCOUNT_ID: ((telia-divx-common-services-stage-account-id)) |
| 118 | + KMS_KEY_ID: ((telia-divx-common-services-stage-state-bucket-key)) |
| 119 | + file: this-module/.ci/tasks/inject-secrets/task.yml |
| 120 | + input_mapping: {source: this-module} |
| 121 | + output_mapping: {secret-source: source} |
| 122 | + - task: get-terraform-out |
| 123 | + params: |
| 124 | + directory: deploy-bucket |
| 125 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 126 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 127 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 128 | + file: this-module/.ci/tasks/terraform-output/task.yml |
| 129 | + - task: purge-bucket |
| 130 | + params: |
| 131 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 132 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 133 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 134 | + file: this-module/.ci/tasks/purge-bucket/task.yml |
| 135 | + - task: destroy |
| 136 | + params: |
| 137 | + directory: deploy-bucket |
| 138 | + AWS_ACCESS_KEY_ID: ((telia-divx-common-services-stage-access-key)) |
| 139 | + AWS_SECRET_ACCESS_KEY: ((telia-divx-common-services-stage-secret-key)) |
| 140 | + AWS_SESSION_TOKEN: ((telia-divx-common-services-stage-session-token)) |
| 141 | + file: this-module/.ci/tasks/destroy/task.yml |
| 142 | + |
| 143 | +resources: |
| 144 | + - name: this-module |
| 145 | + type: git |
| 146 | + source: |
| 147 | + uri: [email protected]:telia-oss/terraform-aws-cost-and-usage-reports.git |
| 148 | + branch: master |
| 149 | + private_key: ((aws-common-services-deploy-key)) |
| 150 | + |
0 commit comments