-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
69 lines (62 loc) · 1.41 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
pipeline {
agent any
tools {nodejs "node"}
environment {
// SEMGREP_BASELINE_REF = ""
SEMGREP_APP_TOKEN = credentials('SEMGREP_APP_TOKEN')
SEMGREP_PR_ID = "${env.CHANGE_ID}"
CHROME_BIN = '/bin/google-chrome'
DATABASE_URL = credentials('22d228cf-a4af-4e9b-be9b-909a6e347141')
// SEMGREP_TIMEOUT = "300"
}
stages {
stage('Checkout SCM') {
steps {
checkout scm
}
}
stage('OWASP DependencyCheck') {
steps {
dependencyCheck additionalArguments: '--format HTML --format XML --disableYarnAudit', odcInstallation: 'OWASP-DPC'
}
post {
success {
dependencyCheckPublisher pattern: 'dependency-check-report.xml'
}
}
}
stage('Linting check') {
steps {
sh 'cd venture-app; npm run lint'
}
}
stage('Semgrep-Scan') {
agent {
docker {
image 'python:3'
args '--user 0:0' // use container as root
args '-v $HOME/.m2:/root/.m2' // For caching
}
}
steps {
sh 'pip3 install semgrep'
sh 'semgrep ci'
}
post {
cleanup {
cleanWs() // Clean up any failed builds
}
}
}
stage('Cypress E2E testing') {
agent {
docker {
image 'cypress/base:16'
}
}
steps {
sh 'cd venture-app; npm i; npm run build; npm run e2e:tests'
}
}
}
}