version: 0.2 phases: install: runtime-versions: python: 3.7 commands: - echo Entered the install phase... - echo About to build $RESOURCE_PATH - export PATH="/usr/local/bin:$PATH" - /usr/local/bin/dockerd-entrypoint.sh - cat /var/log/docker.log - ENTRY_PATH=$(python scripts/entry.py $RESOURCE_PATH/.rpdk-config) - echo ENTRY_PATH is $ENTRY_PATH - BUILD_FILE_NAME=$(cat ENTRY_PATH | sed s/_/-/g) - BUILD_FILE_NAME="${BUILD_FILE_NAME}.zip" - 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 - cd $RESOURCE_PATH - which python - python --version - ls /usr/local/bin - pip freeze - cfn --version - which sam - sam --version - echo $PATH 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 - SETUP_STACK_NAME="setup-$(echo $ENTRY_PATH | sed s/_/-/g)" - rain deploy test/setup.yml $SETUP_STACK_NAME -y - 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 - rain rm $SETUP_STACK_NAME -y artifacts: files: - $BUILD_FILE_NAME name: extensions-build