-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
83 lines (77 loc) · 3.05 KB
/
Jenkinsfile
File metadata and controls
83 lines (77 loc) · 3.05 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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 -B -Dstyle.color=never -f examples/jms -U clean install"
sh "mvn -B -Dstyle.color=never -f examples/kafka clean install"
sh "mvn -B -Dstyle.color=never -f examples/pulsar clean install"
}
}
stage("Checks") {
parallel {
stage("Vulnerability scanning") {
steps {
echo "Running snyk scan.."
sh "./gradlew --no-daemon snyk-test"
}
}
stage("Dependency Upgrades") {
steps {
script {
echo "Checking dependencies.."
sh "./gradlew dependencyUpdates -Drevision=release -DgradleReleaseChannel=current -DoutputFormatter=html --no-parallel --warning-mode all"
}
}
}
stage("Tests") {
steps {
script {
echo "Running tests.."
sh "./gradlew --no-daemon test"
}
}
}
}
}
stage("Upload") {
steps {
echo "Uploading archives.."
sh "./gradlew --no-daemon publish"
}
}
}
}
}
post {
always {
archiveArtifacts artifacts: '**/build/test-results/**/*.xml'
archiveArtifacts artifacts: '**/build/dependencyUpdates/*'
archiveArtifacts artifacts: '**/build/libs/**/*.jar,**/build/distributions/*', fingerprint: true
archiveArtifacts artifacts: '**/build/reports/**/*', fingerprint: true
junit testResults: '**/build/test-results/**/*.xml', keepLongStdio: true
recordCoverage(tools: [[parser: 'JACOCO']])
}
cleanup {
cleanWs()
}
}
}