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:
|
phases:
|
||||||
install:
|
install:
|
||||||
runtime-versions:
|
runtime-versions:
|
||||||
java: openjdk11
|
java: openjdk8
|
||||||
pre_build:
|
pre_build:
|
||||||
commands:
|
commands:
|
||||||
- AWS_ACC=$(echo $CODEBUILD_BUILD_ARN | cut -d':' -f5)
|
- echo Nothing to do in prebuild
|
||||||
- REPOSITORY_URI=$AWS_ACC.dkr.ecr.$AWS_REGION.amazonaws.com
|
|
||||||
build:
|
build:
|
||||||
commands:
|
commands:
|
||||||
- echo Build started on `date`
|
- echo Build started on `date`
|
||||||
- mvn install
|
|
||||||
- mvn package
|
- mvn package
|
||||||
- docker build . -t $REPOSITORY_URI/${REPO}:latest
|
|
||||||
- echo Build completed on `date`
|
|
||||||
post_build:
|
post_build:
|
||||||
commands:
|
commands:
|
||||||
- $(aws ecr get-login --region $AWS_REGION --no-include-email)
|
- echo Build completed on `date`
|
||||||
- aws ecr describe-repositories --registry-id ${AWS_ACC} --repository-name ${REPO}
|
|
||||||
- docker push $REPOSITORY_URI/${REPO}:latest
|
|
||||||
artifacts:
|
artifacts:
|
||||||
files:
|
files:
|
||||||
- target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
|
- target/spring-petclinic-2.2.0.BUILD-SNAPSHOT.jar
|
Loading…
Reference in a new issue