-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
51 lines (46 loc) · 1.54 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
pipeline {
agent any
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
}
stages {
stage("Pipeline" ) {
stages {
stage("Checkout") {
steps {
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: scm.extensions + [[$class: 'CleanBeforeCheckout']],
userRemoteConfigs: scm.userRemoteConfigs
])
}
}
stage("Build") {
steps {
echo "Building.."
sh "./gradlew --no-daemon clean build"
sh "mvn -f examples/jms clean install -Dsnyk.skip"
sh "mvn -f examples/kafka clean install -Dsnyk.skip"
sh "mvn -f examples/pulsar clean install -Dsnyk.skip"
}
}
stage("Vulnerability scanning") {
steps {
echo "Running snyk scan.."
sh "./gradlew --no-daemon snyk-test"
sh "mvn -f examples/jms test"
sh "mvn -f examples/kafka test"
sh "mvn -f examples/pulsar test"
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}