-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 2.2 KB
/
deploy-to-aws.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
69
70
71
72
73
74
75
76
77
78
79
name: Deploy to AWS
on:
push:
branches: ["dev"]
env:
AWS_REGION: "eu-north-1"
NG_CLI_ANALYTICS: "ci"
AWS_ENVIRONMENT: "dev"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Print commit sha
shell: bash
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
run: |
echo "sha: $COMMIT_SHA"
- name: Set up Java JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Set up Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
cache-dependency-path: webui/package-lock.json
- name: Build Conformance-Gateway
run: |
./mvnw package -B -V -DskipTests
# No need to run tests, as they are already run in the PR workflow
- name: Build Web UI
run: |
cd webui
echo Install AWS CDK
npm install -g aws-cdk
echo Install dependencies
npm install
echo Build Web UI
npm run build -- --configuration=${{ env.AWS_ENVIRONMENT }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ env.AWS_REGION }}
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Diff Conformance-Gateway Stack of ${{ env.AWS_ENVIRONMENT }}
run: |
cd cdk/
cdk diff ${{ env.AWS_ENVIRONMENT }}ConformanceStack
- name: Deploy Conformance-Gateway Stack to ${{ env.AWS_ENVIRONMENT }}
run: |
cd cdk/
cdk deploy ${{ env.AWS_ENVIRONMENT }}ConformanceStack
- name: Verify a scenario in AWS Dev environment
env:
TEST_LOGIN_EMAIL: ${{ secrets.AWS_DEV_LOGIN_EMAIL }} # User account details to log in the Web UI.
TEST_LOGIN_PASSWORD: ${{ secrets.AWS_DEV_LOGIN_PASSWORD }}
TEST_BASE_URL: ${{ secrets.AWS_DEV_WEB_URL }}
run: |
./mvnw -B test -Pintegration