-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
28 lines (28 loc) · 1.17 KB
/
buildspec.yml
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
#
# Requires Docker image with both AWS CLI and Sbt. This one works well: https://hub.docker.com/r/toolsplus/scala-sbt-aws/
#
# Don't forget to set artifacts_bucket and artifacts_prefix environment variables in CodeBuild
#
# Unfortunately, changing buildspec location from default one (root folder) isn't straightforward at the moment,
# it's only possible through CLI together with all other settings for source code.
# (http://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html)
# So, let's assume location and name of the file as hardcoded for no2
#
version: 0.2
phases:
build:
commands:
- cd gallery_resizer_lambda
# - echo bucket - $artifacts_bucket , prefix - $artifacts_prefix
# - pwd
# - ls
- sbt assembly
- aws cloudformation package --template-file resizerLambdaSAM.yaml --s3-bucket $artifacts_bucket
--s3-prefix $artifacts_prefix
--output-template-file target/resizerLambdaSAMProcessed.yaml
- cat target/resizerLambdaSAMProcessed.yaml
artifacts:
# type: zip
files:
- gallery_resizer_lambda/target/resizerLambdaSAMProcessed.yaml
discard-path: yes