-
Notifications
You must be signed in to change notification settings - Fork 337
/
buildspec.yml
32 lines (30 loc) · 1.15 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
29
30
31
32
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
#- echo '***** Download nodejs repo:'
#- curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
#- echo '***** install nodejs:'
#- apt-get install -y nodejs build-essential
#- echo '***** install our npms:'
#- npm install
build:
commands:
#- echo '***** run tests:'
#- npm test -- > testresult.txt
# - 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:
- '**/*'