Merge pull request #1 from Sameer515/Sameer515-patch-1 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 0.2 | |
env: | |
parameter-store: | |
# Requires that you have a secure string in AWS Systems Manager Parameter Store | |
# called "snykAuthToken" with your Snyk token. | |
SNYK_TOKEN: "snykAuthToken" | |
phases: | |
install: | |
commands: | |
# the following commands download and activate a x86 binary | |
# please ensure to use a build environment image like the following: | |
# aws/codebuild/amazonlinux2-x86_64-standard:4.0 | |
- latest_version=$(curl -Is "https://github.com/snyk/cli/releases/latest" | grep "^location" | sed 's#.*tag/##g' | tr -d "\r") | |
- snyk_cli_dl_linux="https://github.com/snyk/cli/releases/download/${latest_version}/snyk-linux" | |
- curl -Lo ./snyk $snyk_cli_dl_linux | |
- chmod +x ./snyk | |
- latest_version=$(curl -Is "https://github.com/snyk/snyk-to-html/releases/latest" | grep "^location" | sed 's#.*tag/##g' | tr -d "\r") | |
- snyk_to_html_cli_dl_linux="https://github.com/snyk/snyk-to-html/releases/download/${latest_version}/snyk-to-html-linux" | |
- curl -Lo ./snyk-to-html $snyk_to_html_cli_dl_linux | |
- chmod +x ./snyk-to-html | |
build: | |
commands: | |
# - npm install | |
# - npm test # Run your unit tests, etc | |
- ./snyk test --json | ./snyk-to-html -o results-snyk-open-source.html | |
artifacts: | |
files: | |
- 'results*.html' | |
name: snyk-$(date +%Y-%m-%d) |