forked from aws-samples/serverless-test-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
28 lines (27 loc) · 846 Bytes
/
buildspec.yml
File metadata and controls
28 lines (27 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: 0.2
phases:
install:
runtime-versions:
java: corretto11
commands:
- cd ./java-appsync-sam
pre_build:
commands:
- yum install java-17-amazon-corretto-devel -y
- alternatives --set java /usr/lib/jvm/java-17-amazon-corretto.x86_64/bin/java
- export JAVA_HOME=/usr/lib/jvm/java-17-amazon-corretto.x86_64
build:
commands:
- echo Build started on `date`
- mvn package
post_build:
commands:
- echo Build completed on `date`
- sam package --template template.yaml --s3-bucket $BUILD_OUTPUT_BUCKET --output-template-file application.yaml
artifacts:
files:
- ./java-appsync-sam/target/java-appsync-sam-1.0-SNAPSHOT.jar
- ./java-appsync-sam/appspec.yml
- ./java-appsync-sam/application.yaml
- ./java-appsync-sam/cognito.yaml
discard-paths: yes