Skip to content

Commit bd0d48a

Browse files
authored
refactor: TTL-926 delete iac from ci pipeline (#1000)
1 parent e16048c commit bd0d48a

File tree

1 file changed

+0
-94
lines changed

1 file changed

+0
-94
lines changed

.github/workflows/time-tracker-ui-ci.yml

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ jobs:
1313
ci:
1414
runs-on: ubuntu-latest
1515
env:
16-
WORKING_DIR: infrastructure/
17-
ARM_CLIENT_ID: ${{secrets.TF_ARM_CLIENT_ID}}
18-
ARM_CLIENT_SECRET: ${{secrets.TF_ARM_CLIENT_SECRET}}
19-
ARM_SUBSCRIPTION_ID: ${{secrets.TF_ARM_SUBSCRIPTION_ID}}
20-
ARM_TENANT_ID: ${{secrets.TF_ARM_TENANT_ID}}
2116
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
2217
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
2318

@@ -27,11 +22,6 @@ jobs:
2722
- name: Checkout
2823
uses: actions/checkout@v3
2924

30-
- name: Authenticate with the TF modules repository
31-
uses: webfactory/[email protected]
32-
with:
33-
ssh-private-key: ${{ secrets.INFRA_TERRAFORM_MODULES_SSH_PRIV_KEY }}
34-
3525
- name: build docker
3626
run: make build
3727

@@ -43,87 +33,3 @@ jobs:
4333
env:
4434
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4535
run: bash <(curl -s https://codecov.io/bash)
46-
47-
- name: Setup terraform
48-
uses: hashicorp/setup-terraform@v1
49-
with:
50-
terraform_version: 1.1.9
51-
52-
- name: 'Terraform Init'
53-
id: init
54-
working-directory: ./${{ env.WORKING_DIR }}
55-
run: terraform init
56-
57-
- name: 'Terraform validate'
58-
id: validate
59-
working-directory: ./${{ env.WORKING_DIR }}
60-
run: terraform validate
61-
62-
- name: Terraform Plan Stage
63-
id: plan-stage
64-
run: terraform plan -var-file=${{ env.TF_WORKSPACE }}.tfvars -var image_tag=latest -no-color
65-
continue-on-error: true
66-
working-directory: ./${{ env.WORKING_DIR }}
67-
env:
68-
TF_WORKSPACE: stage
69-
70-
- name: Terraform Plan Prod
71-
id: plan-prod
72-
run: terraform plan -var-file=${{ env.TF_WORKSPACE }}.tfvars -var image_tag=latest -no-color
73-
continue-on-error: true
74-
working-directory: ./${{ env.WORKING_DIR }}
75-
env:
76-
TF_WORKSPACE: prod
77-
78-
- name: Update Pull Request with Stage Plan
79-
uses: actions/[email protected]
80-
if: github.event_name == 'pull_request'
81-
env:
82-
PLAN: "terraform\n${{ steps.plan-stage.outputs.stdout }}"
83-
TF_WORKSPACE: stage
84-
with:
85-
github-token: ${{ secrets.GITHUB_TOKEN }}
86-
script: |
87-
const output = `#### [${{ env.WORKING_DIR }}][${{ env.TF_WORKSPACE }}] Terraform Plan 📖 \`${{ steps.plan-stage.outcome }}\`
88-
<details><summary>Show Plan</summary>
89-
\`\`\`\n
90-
${process.env.PLAN}
91-
\`\`\`
92-
</details>
93-
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
94-
github.issues.createComment({
95-
issue_number: context.issue.number,
96-
owner: context.repo.owner,
97-
repo: context.repo.repo,
98-
body: output
99-
})
100-
101-
- name: Update Pull Request with Prod Plan
102-
uses: actions/[email protected]
103-
if: github.event_name == 'pull_request'
104-
env:
105-
PLAN: "terraform\n${{ steps.plan-prod.outputs.stdout }}"
106-
TF_WORKSPACE: prod
107-
with:
108-
github-token: ${{ secrets.GITHUB_TOKEN }}
109-
script: |
110-
const output = `#### [${{ env.WORKING_DIR }}][${{ env.TF_WORKSPACE }}] Terraform Plan 📖 \`${{ steps.plan-prod.outcome }}\`
111-
<details><summary>Show Plan</summary>
112-
\`\`\`\n
113-
${process.env.PLAN}
114-
\`\`\`
115-
</details>
116-
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
117-
github.issues.createComment({
118-
issue_number: context.issue.number,
119-
owner: context.repo.owner,
120-
repo: context.repo.repo,
121-
body: output
122-
})
123-
- name: Terraform Plan Stage Status
124-
if: steps.plan-stage.outcome == 'failure'
125-
run: exit 1
126-
127-
- name: Terraform Plan Prod Status
128-
if: steps.plan-prod.outcome == 'failure'
129-
run: exit 1

0 commit comments

Comments
 (0)