forked from aws-samples/amazon-rds-init-cdk
-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (68 loc) · 2.07 KB
/
setup.yml
File metadata and controls
77 lines (68 loc) · 2.07 KB
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
name: Setup Sample with LocalStack
on:
workflow_call:
inputs:
store-cloudpod:
required: true
type: string
localstack-version:
required: true
type: string
jobs:
setup-localstack:
name: Setup infrastructure
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Setup Nodejs
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: |
make install
- name: Start LocalStack
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
LOCALSTACK_VOLUME_DIR: ${{ github.workspace }}/ls_test
run: |
mkdir ls_test
ls -la ls_test
docker pull localstack/localstack-pro:${{ inputs.localstack-version }}
# Start LocalStack in the background
LS_LOG=trace localstack start -d
# Wait 30 seconds for the LocalStack container to become ready before timing out
echo "Waiting for LocalStack startup..."
localstack wait -t 30
echo "Startup complete"
- name: Deploy the application
env:
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
run: |
make build
make bootstrap
make deploy
# TODO should we run smoke tests before creating the pod?
- name: Run Smoke Tests
run: |
./test-helper/smoke-test.sh
- name: Save the Cloud Pod
if: ${{ inputs.store-cloudpod == 'true' }}
uses: HarshCasper/cloud-pod-save@v0.1.0
with:
name: 'release-pod-mysql.zip'
location: 'disk'
- name: Upload Pod as Artifact
if: ${{ inputs.store-cloudpod == 'true' }}
uses: actions/upload-artifact@v3
with:
name: cloudpod
path: release-pod-mysql.zip
retention-days: 1