forked from brentley/ecsdemo-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
24 lines (22 loc) · 836 Bytes
/
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
version: 0.2
phases:
install:
commands:
- export IMAGE_TAG=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- export ACCOUNT=$(echo $CODEBUILD_BUILD_ARN |cut -f5 -d:)
- echo '***** This is the current env:'
- printenv
build:
commands:
# - docker build -t myimage .
post_build:
commands:
- printf '[{"name":"example-backend","imageUri":"%s"}]' $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json
- echo $IMAGE_TAG > code_hash.txt
# - docker pull anchore/cli
# - docker run -d -v $(pwd):/source-dir -v /var/run/docker.sock:/var/run/docker.sock --name anchore anchore/cli:latest
# - docker exec anchore anchore feeds sync
# - docker exec anchore anchore analyze --image myimage --dockerfile /source-dir/Dockerfile
artifacts:
files:
- '**/*'