-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (67 loc) · 2.38 KB
/
build_push_preview.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
66
67
68
name: Build and Push Server Application to AWS PREVIEW
on:
push:
branches:
- preview
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, lint, test
run: |
yarn install --frozen-lockfile
yarn run lint
yarn run test:coverage -w 1
env:
CI: true
NODE_ENV: test
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
GITHUB_NPM_TOKEN: ${{ secrets.GH_NPM_TOKEN }}
- name: report code coverage
run: npx codecov@3
if: matrix.node-version == '14.x'
env:
CI: true
NODE_ENV: test
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_NPM_TOKEN: not-actually-used-but-necessary-here
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Run deploy-playbook
uses: osu-wams/action-ansible-playbook@v2
with:
playbook: deploy-playbook.yaml
directory: .github/ansible
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
CLOUDFORMATION_BUCKET: ${{ secrets.CLOUDFORMATION_BUCKET }}
CLOUDFORMATION_STACKNAME: 'osu-dx-preview'
CLOUDFORMATION_PARAMETERS_FILE: 'parameters-preview.json'
CLOUDFORMATION_TEMPLATE_FILE: 'full-stack.yml'
CLUSTER: 'preview'
ECR_REPOSITORY: 'dx'
GITHUB_NPM_TOKEN: ${{ secrets.GH_NPM_TOKEN }}
TEAMS_WAMS_CICD_HOOK_URL: ${{ secrets.TEAMS_WAMS_CICD_HOOK_URL }}