forked from snyk-labs/nodejs-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
47 lines (40 loc) · 1.15 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
pipeline {
agent any
tools
{
nodejs 'NodeJS 18.1.0'
}
environment {
SNYK_TOKEN = 'da12766a-46b6-4186-8ba1-83eb1aae653c'
}
stages {
stage('Install Snyk and Snyk Filter') {
steps {
sh 'node -v'
sh 'npm prune'
sh 'npm install -g snyk'
sh 'npm install -g snyk-filter'
}
}
stage('Build') {
steps {
sh 'node -v'
sh 'npm install'
}
}
stage('Snyk Monitor') {
steps {
sh 'echo "***RUNNING SNYK TEST***"'
sh 'snyk monitor --org=fdf3b63a-9a4e-43d8-bae3-85212f002bea --project-name=JenkinsGoof'
}
}
stage('Snyk Test') {
steps {
sh 'echo "***RUNNING SNYK TEST***"'
sh 'snyk test --json-file-output=vuln.json || true'
sh 'snyk-filter -i vuln.json -f example-licenses-only.yml'
sh 'snyk code test'
}
}
}
}