diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 000000000..7606dd7c5 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,27 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: openjdk8 + commands: + # Upgrade AWS CLI to the latest version + - pip install --upgrade awscli + pre_build: + commands: + - mvn clean compile test + build: + commands: + - mvn war:exploded + post_build: + commands: + - cp -r .ebextensions/ target/ROOT/ + # aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template-file template-export.yml + # Do not remove this statement. This command is required for AWS CodeStar projects. + # Update the AWS Partition, AWS Region, account ID and project ID in the project ARN on template-configuration.json file so AWS CloudFormation can tag project resources. + #sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-configuration.json +artifacts: + type: zip + files: + - 'template-export.yml' + - 'template-configuration.json'