-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CircleCI Snyk Code to HTML Example (#81)
* Create config-code-scan-html.yml * Create config-opensource.yml * reorganize CircleCI folder
- Loading branch information
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: 2.1 | ||
orbs: | ||
snyk: snyk/[email protected] | ||
|
||
jobs: | ||
build-and-test: | ||
docker: | ||
- image: cimg/openjdk:11.0 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Build | ||
command: mvn -B -DskipTests clean package | ||
- run: | ||
name: Test | ||
command: mvn test | ||
snyk-scan: | ||
docker: | ||
- image: cimg/openjdk:11.0-node | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Snyk to HTML | ||
command: npm install --prefix=$HOME/.local -g snyk-to-html | ||
- snyk/scan: | ||
monitor-on-build: false | ||
fail-on-issues: false | ||
command: code test | ||
additional-arguments: --json-file-output=code-results.json | ||
- run: | ||
name: Generate Snyk HTML report | ||
command: cat code-results.json | snyk-to-html -o code-report.html | ||
- store_artifacts: | ||
path: code-report.html | ||
|
||
workflows: | ||
build-test-snyk: | ||
jobs: | ||
- build-and-test | ||
- snyk-scan |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2.1 | ||
orbs: | ||
snyk: snyk/[email protected] | ||
|
||
jobs: | ||
snyk-scan: | ||
docker: | ||
- image: cimg/openjdk:11.0 | ||
steps: | ||
- checkout | ||
- run: mvn install | ||
- snyk/scan: | ||
command: monitor | ||
monitor-on-build: false | ||
|
||
workflows: | ||
build-test-snyk: | ||
jobs: | ||
- snyk-scan |
File renamed without changes.
File renamed without changes.