-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJenkinsfile
43 lines (36 loc) · 1.08 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
// param for RELEASE_VERSION - if empty, generate snapshot build, otherwise, release build
// this pipeline doesn't do release management (yet), so test->release is still a manual process
pipeline {
parameters {
string name: 'RELEASE_VERSION', defaultValue: '', description: '(e.g., 1.0.0, leave blank for current snapshot)', trim: true
}
agent {
// Code Dx build environment already has SBT and company
label 'codedx-build-small'
}
stages {
stage('Build extension') {
steps {
script {
if (!params.RELEASE_VERSION.isEmpty()) {
writeFile file: '.version', text: params.RELEASE_VERSION
}
}
withCache(name: 'codedx-burp-cache', baseFolder: env.HOME, contents: '.sbt .ivy2') {
sbt tasks: 'compile assembly'
}
}
post {
success {
archiveArtifacts artifacts: 'target/burp-extension-assembly-*.jar', fingerprint: true, onlyIfSuccessful: true
//TODO: analyze with Code Dx
script {
if (!params.RELEASE_VERSION.isEmpty()) {
currentBuild.displayName = "Release ${params.RELEASE_VERSION}"
}
}
}
}
}
}
}