version: 0.2 phases: install: runtime-versions: python: 3.7 commands: - echo Entered the install phase... - echo About to build $HOOK_PATH - export PATH="/usr/local/bin:$PATH" - /usr/local/bin/dockerd-entrypoint.sh - cat /var/log/docker.log - ENTRY_PATH=$(python scripts/entry.py $HOOK_PATH/.rpdk-config) - echo ENTRY_PATH is $ENTRY_PATH - cd $HOOK_PATH - pip install git+https://github.com/aws-cloudformation/cloudformation-cli.git@master - pip install git+https://github.com/aws-cloudformation/cloudformation-cli-python-plugin.git@master - pip install cfn_guard_rs_hook - cfn --version - sam --version build: commands: - echo Entered the build phase... - pylint --rcfile ../../config/.pylintrc src/$ENTRY_PATH - pytest src - bandit -c ../../config/.banditrc -r src - cfn validate - cfn generate - cfn submit --dry-run - nohup sam local start-lambda & - sleep 10 - cfn test --region $AWS_REGION # Region added: https://github.com/aws-cloudformation/cloudformation-cli/issues/625 finally: - cat rpdk.log