-
Notifications
You must be signed in to change notification settings - Fork 87
CLOUDP-66895: Move snyk scanner to evergreen #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
18bf2de
42019e9
91cd766
393192b
2798223
5a1d81d
c9c0e30
5c224d1
d9cf988
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,29 @@ functions: | |
| set -Eeou pipefail | ||
|
|
||
| curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh | ||
| "install snyk": | ||
| - command: shell.exec | ||
| type: setup | ||
| params: | ||
| working_dir: src/github.com/mongodb/mongocli/bin | ||
| script: | | ||
| set -Eeou pipefail | ||
|
|
||
| curl -sfL https://github.com/snyk/snyk/releases/download/v${snyk_ver}/snyk-linux -o snyk | ||
| chmod +x snyk | ||
| "snyk scan": | ||
| - command: shell.exec | ||
| type: test | ||
| params: | ||
| working_dir: src/github.com/mongodb/mongocli | ||
| script: | | ||
| export SNYK_TOKEN=${snyk_token} | ||
|
|
||
| set -Eeou pipefail | ||
|
|
||
| export GOROOT="${go_root}" | ||
| export PATH="./bin:$GOROOT/bin:$PATH" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is GOROOT needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left them because I'm not sure if snyk needs a working go env to run, if there's no
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, goroot is needed, test here without it |
||
| ./bin/snyk test --org=cloud | ||
| "install curator": | ||
| - command: shell.exec | ||
| type: setup | ||
|
|
@@ -355,6 +378,12 @@ tasks: | |
| - func: "clone" | ||
| - func: "install golangci-lint" | ||
| - func: "lint" | ||
| - name: snyk_scan | ||
| tags: ["code_health"] | ||
| commands: | ||
| - func: "clone" | ||
| - func: "install snyk" | ||
| - func: "snyk scan" | ||
| - name: config_e2e | ||
| tags: ["e2e","generic"] | ||
| depends_on: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: export before set and also more exports below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, missing ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before because it's a secret, it's an evergreen thing do move these kind of expansions before the
sets also for expansions we usually don't use quotes("") but I can try it