Skip to content

Commit e1a57d7

Browse files
committed
ci: audit npm packages
1 parent e7907c2 commit e1a57d7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

vars/runJenkinsPipeline.groovy

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,21 @@ def call(){
247247
}
248248
}
249249
}
250+
stage('Audit NPM packages'){
251+
options{
252+
timeout(5)
253+
}
254+
steps{
255+
catchError(buildResult: 'SUCCESS', message: 'Audit NPM found issues', stageResult: 'UNSTABLE') {
256+
sh 'npm audit --json > logs/npm-audit.json'
257+
}
258+
}
259+
post{
260+
always{
261+
recordIssues(tools: [npmAudit(pattern: 'logs/npm-audit.json')])
262+
}
263+
}
264+
}
250265
}
251266
post{
252267
always{

0 commit comments

Comments
 (0)