version: 0.2 phases: install: runtime-versions: python: 3.7 java: corretto8 commands: - echo Entered the install phase... - echo About to build $HOOK_PATH - export PATH="/usr/local/bin:$PATH" - TYPE_NAME=$(python scripts/type_name.py $HOOK_PATH/.rpdk-config) - TYPE_CLEAN_NAME="$(echo $TYPE_NAME | sed s/::/-/g | tr ‘[:upper:]’ ‘[:lower:]’)" - /usr/local/bin/dockerd-entrypoint.sh - cat /var/log/docker.log - echo TYPE_CLEAN_NAME is $TYPE_CLEAN_NAME - BUILD_FILE_NAME="${TYPE_CLEAN_NAME}.zip" - pip install git+https://github.com/aws-cloudformation/cloudformation-cli.git@master - pip install git+https://github.com/aws-cloudformation/cloudformation-cli-java-plugin.git@master - cd $HOOK_PATH - ls /usr/local/bin - pip freeze - cfn --version - which sam - sam --version - echo $PATH build: commands: - echo Entered the build phase... - cfn validate - cfn generate - SETUP_STACK_NAME="setup-$(echo $TYPE_CLEAN_NAME | sed s/_/-/g)" - if [ -f test/setup.yml ]; then rain deploy test/setup.yml $SETUP_STACK_NAME -y; fi - mvn clean verify javadoc:javadoc - cfn submit --dry-run - ls -ltra - nohup sam local start-lambda & - sleep 10 - cfn test --enforce-timeout 90 --region $AWS_REGION # Region added: https://github.com/aws-cloudformation/cloudformation-cli/issues/625 finally: - cat rpdk.log - if [ -f test/setup.yml ]; then rain rm $SETUP_STACK_NAME -y; fi artifacts: files: - $BUILD_FILE_NAME name: extensions-build