mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 16:25:49 +00:00
add buildspec.yml file
This commit is contained in:
parent
1c3446e113
commit
e0481de765
1 changed files with 3 additions and 9 deletions
|
@ -3,23 +3,17 @@ version: 0.2
|
|||
phases:
|
||||
install:
|
||||
runtime-versions:
|
||||
java: openjdk11
|
||||
java: openjdk8
|
||||
pre_build:
|
||||
commands:
|
||||
- AWS_ACC=$(echo $CODEBUILD_BUILD_ARN | cut -d':' -f5)
|
||||
- REPOSITORY_URI=$AWS_ACC.dkr.ecr.$AWS_REGION.amazonaws.com
|
||||
- echo Nothing to do in prebuild
|
||||
build:
|
||||
commands:
|
||||
- echo Build started on `date`
|
||||
- mvn install
|
||||
- mvn package
|
||||
- docker build . -t $REPOSITORY_URI/${REPO}:latest
|
||||
- echo Build completed on `date`
|
||||
post_build:
|
||||
commands:
|
||||
- $(aws ecr get-login --region $AWS_REGION --no-include-email)
|
||||
- aws ecr describe-repositories --registry-id ${AWS_ACC} --repository-name ${REPO}
|
||||
- docker push $REPOSITORY_URI/${REPO}:latest
|
||||
- echo Build completed on `date`
|
||||
artifacts:
|
||||
files:
|
||||
- target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
|
Loading…
Reference in a new issue