-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (101 loc) · 3.48 KB
/
aws-deploy.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: aws-deploy
on:
push:
branches: [master]
jobs:
org-formation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Assume AWS Role
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.CI_SERVICE_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_SERVICE_USER_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::928879890086:role/bootstrap-ci-service-access-CiServiceRole-ZUKNUGHX2CNB
role-duration-seconds: 1200
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm install
- name: Validate ofn templates
run: npm run validate-tasks
- name: Deploy with ofn
run: npm run ci-perform-tasks
sceptre-MemberX:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Cache python modules
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sceptre
- name: Assume AWS Role
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.CI_SERVICE_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_SERVICE_USER_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::320171649655:role/OrganizationFormationBuildAccessRole
role-duration-seconds: 1200
- name: Deploy with sceptre
run: |
cd sceptre/MemberX
sceptre launch prod --yes
sceptre-MemberY:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Cache python modules
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sceptre
- name: Assume AWS Role
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.CI_SERVICE_USER_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.CI_SERVICE_USER_SECRET_ACCESS_KEY }}
aws-region: us-east-1
role-to-assume: arn:aws:iam::346742127440:role/OrganizationFormationBuildAccessRole
role-duration-seconds: 1200
- name: Deploy with sceptre
run: |
cd sceptre/MemberY
sceptre launch prod --yes