Created
June 12, 2020 11:28
-
-
Save thierryturpin/8f08fafe62f9d4cb07fc755adf551b2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
env: | |
secrets-manager: | |
sonartoken: sonarcloud:token | |
phases: | |
install: | |
commands: | |
- echo Entered the install phase... | |
build: | |
commands: | |
- echo Entered the build phase... | |
- python -m unittest discover -s tests/ | |
- echo Python unit tests finished `date` | |
- ./script.sh | |
- cat results.json | jq . | |
- new_security_rating=`cat results.json | jq -r '.projectStatus.conditions[] | select(.metricKey == "new_security_rating")' | jq -r .status` | |
- if [ "$new_security_rating" = 'ERROR' ] ; then exit 1 ;fi | |
- ls /usr/local/airflow/efs-dags/dags/ | |
- rm -rf /usr/local/airflow/efs-dags/dags/ | |
- cp -r dags/ /usr/local/airflow/efs-dags/dags/ | |
- echo Build completed on `date` | |
finally: | |
- echo This always runs even if the install command fails | |
artifacts: | |
files: | |
- '**/*' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment