generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (61 loc) · 2.16 KB
/
deploy-sysdig.yml
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
name: Deploy Sysdig Alerts
on:
push:
# branches: [main]
# paths:
# - "terraform/**"
concurrency:
# Do not interrupt previous workflows
# avoid state corruption from cancels
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
installed:
environment: tools
name: Check Sysdig Installed
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- run: ./.github/scripts/sysdig_installed.sh
env:
OC_NAMESPACE: ${{ secrets.OC_NAMESPACE }}
OC_SERVER: ${{ secrets.OC_SERVER }}
OC_TOKEN: ${{ secrets.OC_TOKEN }}
validate:
environment: tools
needs: installed
name: Validate Sysdig Terraform
runs-on: ubuntu-22.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
- name: Validate Sysdig Terraform
run: APPLY=false ./.github/scripts/sysdig_deploy.sh
env:
STATE_BACKEND_BUCKET: ${{ secrets.STATE_BACKEND_BUCKET }}
STATE_BACKEND_ACCESS_KEY: ${{ secrets.STATE_BACKEND_ACCESS_KEY }}
STATE_BACKEND_SECRET_KEY: ${{ secrets.STATE_BACKEND_SECRET_KEY }}
STATE_BACKEND_FILEPATH: ${{ secrets.STATE_BACKEND_FILEPATH }}
STATE_BACKEND_ENDPOINT: ${{ secrets.STATE_BACKEND_ENDPOINT }}
TF_VAR_sysdig_api_token: ${{ secrets.TF_VAR_SYSDIG_API_TOKEN }}
AWS_NO_SIGN_REQUEST: 1
deploy:
### if: github.ref == 'refs/heads/main'
needs: validate
environment: tools
name: Deploy Sysdig Terraform
runs-on: ubuntu-22.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v4
- name: Apply Sysdig Terraform
run: APPLY=true ./.github/scripts/sysdig_deploy.sh
env:
STATE_BACKEND_BUCKET: ${{ secrets.STATE_BACKEND_BUCKET }}
STATE_BACKEND_ACCESS_KEY: ${{ secrets.STATE_BACKEND_ACCESS_KEY }}
STATE_BACKEND_SECRET_KEY: ${{ secrets.STATE_BACKEND_SECRET_KEY }}
STATE_BACKEND_FILEPATH: ${{ secrets.STATE_BACKEND_FILEPATH }}
STATE_BACKEND_ENDPOINT: ${{ secrets.STATE_BACKEND_ENDPOINT }}
TF_VAR_sysdig_api_token: ${{ secrets.TF_VAR_SYSDIG_API_TOKEN }}
AWS_NO_SIGN_REQUEST: 1