Skip to content

[pre-commit.ci] pre-commit autoupdate #65

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #65

Workflow file for this run

name: aws-deploy
on:
pull_request:
branches: '*'
push:
branches: [master]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/[email protected]
org-formation:
if: github.event_name == 'push'
needs: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Assume AWS Role
uses: aws-actions/configure-aws-credentials@v1
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@v1
with:
node-version: 15.x
- name: Cache node modules
uses: actions/cache@v2
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:
if: github.event_name == 'push'
needs: org-formation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Cache python modules
uses: actions/cache@v2
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@v1
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:
if: github.event_name == 'push'
needs: org-formation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Cache python modules
uses: actions/cache@v2
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@v1
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