Skip to content

Commit a1b741d

Browse files
authored
ROX-12480: Add a deploy workflow file for production. (#597)
* Add a deploy workflow file for production. * Shorten names so they fit better in GH UI
1 parent b3c1968 commit a1b741d

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Deploy Prod Env
2+
3+
on:
4+
push:
5+
branches:
6+
- production
7+
8+
jobs:
9+
cancel:
10+
name: Cancel previous runs
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Cancel Previous Runs
14+
uses: n1hility/cancel-previous-runs@v2
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
terraform:
19+
name: Re-terraform production clusters
20+
needs: cancel
21+
runs-on: ubuntu-latest
22+
permissions:
23+
id-token: write
24+
contents: read
25+
environment: production
26+
steps:
27+
- name: Set up Go 1.18
28+
uses: actions/setup-go@v3
29+
with:
30+
go-version: "1.18"
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
- name: Configure AWS credentials
34+
uses: aws-actions/configure-aws-credentials@v1-node16
35+
with:
36+
aws-region: ${{ secrets.AWS_REGION }}
37+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github
38+
- name: Run terraforming on THE production cluster
39+
working-directory: ./dp-terraform/helm/rhacs-terraform
40+
env:
41+
USE_AWS_VAULT: false
42+
run: |
43+
set -euo pipefail
44+
./terraform_cluster.sh prod acs-prod-dp-01
45+
46+
deploy-probe:
47+
name: Deploy blackbox monitoring probe service to production
48+
needs: cancel
49+
runs-on: ubuntu-latest
50+
permissions:
51+
id-token: write
52+
contents: read
53+
environment: production
54+
steps:
55+
- name: Set up Go 1.18
56+
uses: actions/setup-go@v3
57+
with:
58+
go-version: "1.18"
59+
- name: Checkout
60+
uses: actions/checkout@v3
61+
- name: Configure AWS credentials
62+
uses: aws-actions/configure-aws-credentials@v1-node16
63+
with:
64+
aws-region: ${{ secrets.AWS_REGION }}
65+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github
66+
- name: Deploy probe
67+
working-directory: ./deploy/helm/probe
68+
env:
69+
USE_AWS_VAULT: false
70+
run: |
71+
set -euo pipefail
72+
./deploy.sh prod acs-prod-dp-01

.github/workflows/deploy-stage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Stage Environment
1+
name: Deploy Stage Env
22

33
on:
44
push:
@@ -44,7 +44,7 @@ jobs:
4444
./terraform_cluster.sh stage acs-stage-dp-01
4545
4646
deploy-probe:
47-
name: Deploy blackbox monitoring probe service
47+
name: Deploy blackbox monitoring probe service to stage
4848
needs: cancel
4949
runs-on: ubuntu-latest
5050
permissions:

0 commit comments

Comments
 (0)