forked from aws-ia/cloudformation-github-resource-providers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·25 lines (20 loc) · 954 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# This script runs in the buildspec before testing
#
# It relies on environment variables to be set to replace placeholder
# values in `example-inputs`.
#
# GITHUB_ORG
# GITHUB_USERNAME
#
# Example
#
# GITHUB_ORG=ericzbeard-aws-cep-testing GITHUB_USERNAME=ezbeard-github-test AWS_PROFILE=ezbeard-cep ./setup.sh
mkdir -p inputs
cat example-inputs/inputs_1_create.json | sed "s/GITHUB_ORG/${GITHUB_ORG}/g" | sed "s/GITHUB_USERNAME/${GITHUB_USERNAME}/g" > inputs/inputs_1_create.json
cat example-inputs/inputs_1_update.json | sed "s/GITHUB_ORG/${GITHUB_ORG}/g" | sed "s/GITHUB_USERNAME/${GITHUB_USERNAME}/g" > inputs/inputs_1_update.json
cp example-inputs/inputs_1_invalid.json inputs/
# Not practical to make anything unique here.. we should delete the stack after
cat test/integ.yml | sed "s/GITHUB_ORG/${GITHUB_ORG}/g" | sed "s/GITHUB_USERNAME/${GITHUB_USERNAME}/g" > test/integ-unique.yml
python3 ../get_type_configuration.py