Skip to content

Commit

Permalink
few corrections (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsnyk authored Apr 2, 2024
1 parent 2e89cc1 commit 9c03ff1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
39 changes: 18 additions & 21 deletions AWS-CodeBuild/codebuild-sample-snyk-binary-install/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,27 @@ env:
phases:
install:
commands:
# Use this if you just want to use a fixed version:
# - curl -Lo ./snyk "https://github.com/snyk/snyk/releases/download/v1.136.3/snyk-linux"

# Use this to always get the latest version:
- latest_version=$(curl -Is "https://github.com/snyk/snyk/releases/latest" | grep "^location" | sed 's#.*tag/##g' | tr -d "\r")
- snyk_cli_dl_linux="https://github.com/snyk/snyk/releases/download/${latest_version}/snyk-linux"
# 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

- chmod -R +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
- ./snyk monitor --org=<your-snyk-org-id>
# - npm install
# - npm test # Run your unit tests, etc
- ./snyk test --json | ./snyk-to-html -o results-snyk-open-source.html


#artifacts:
#files:
# - location
# - location
#name: $(date +%Y-%m-%d)
#discard-paths: yes
#base-directory: location
#cache:
#paths:
# - paths
artifacts:
files:
- 'results*.html'
name: snyk-$(date +%Y-%m-%d)
4 changes: 2 additions & 2 deletions AWS-CodeBuild/codebuild-sample-snyk-npm-install/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ phases:

build:
commands:
- npm install
- npm test # Run your unit tests, etc
# - npm install
# - npm test # Run your unit tests, etc
- snyk test
- snyk monitor --org=<your-snyk-org-id>

Expand Down

0 comments on commit 9c03ff1

Please sign in to comment.