Skip to content

Instantly share code, notes, and snippets.

@bellyjay1005
Created October 31, 2019 04:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bellyjay1005/6a05d035687ea4d371158ef6127d514d to your computer and use it in GitHub Desktop.
Save bellyjay1005/6a05d035687ea4d371158ef6127d514d to your computer and use it in GitHub Desktop.
sample buildspec build step
build:
commands:
- echo Deployment started on `date`
- echo Testing...
- anchore-cli --version
- anchore-cli --debug system status
- anchore-cli policy add user-policy/bundle.json
- anchore-cli --debug image add postgres:9
- echo 'Waiting for image to finish analysis'
- anchore-cli image wait postgres:9
- echo 'Analysis complete'
- anchore-cli image vuln postgres:9
- if [ '${ANCHORE_FAIL_ON_POLICY}' = 'true' ] ; then anchore-cli evaluate check postgres:9 ; fi
- echo Build started on `date`
- echo Building Tested Sample Image...
- docker build -t ${STAGE_REPO_NAME} .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment