Skip to content

Commit 47e8161

Browse files
authored
Use shared libraries, make this pipeline consistent (#4)
1 parent 7ac284c commit 47e8161

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

Jenkinsfile

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,27 @@
22
// this pipeline doesn't do release management (yet), so test->release is still a manual process
33

44
pipeline {
5-
agent {
6-
label 'atlassian'
7-
}
8-
9-
options {
10-
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')
11-
}
12-
135
parameters {
146
string name: 'RELEASE_VERSION', defaultValue: '', description: '(e.g., 1.0.0, leave blank for current snapshot)', trim: true
157
}
168

9+
agent {
10+
label 'atlassian'
11+
}
12+
1713
stages {
1814
stage('Build plugin') {
1915
steps {
20-
script {
21-
if (params.RELEASE_VERSION != "") {
22-
sh "atlas-mvn versions:set -DnewVersion=${params.RELEASE_VERSION}"
16+
withCache(name: 'codedx-bamboo-cache', baseFolder: env.HOME, contents: '.m2') {
17+
script {
18+
if (params.RELEASE_VERSION != "") {
19+
sh "atlas-mvn versions:set -DnewVersion=${params.RELEASE_VERSION}"
20+
}
2321
}
24-
}
2522

26-
sh 'atlas-unit-test'
27-
sh 'atlas-package'
23+
sh 'atlas-unit-test'
24+
sh 'atlas-package'
25+
}
2826
}
2927

3028
post {
@@ -36,6 +34,7 @@ pipeline {
3634
currentBuild.displayName = params.RELEASE_VERSION
3735
currentBuild.description = "Release build ${params.RELEASE_VERSION}"
3836
currentBuild.setKeepLog(true)
37+
slack.info "Bamboo Plugin release build ${params.RELEASE_VERSION} complete"
3938
}
4039
}
4140
}
@@ -45,7 +44,9 @@ pipeline {
4544

4645
post {
4746
failure {
48-
slackSend botUser: true, channel: '#codedx-devchat', color: 'danger', message: "Bamboo Plugin build FAILED (<${env.BUILD_URL}|Open>)"
47+
script {
48+
slack.error 'Burp Plugin build FAILED'
49+
}
4950
}
5051
}
5152
}

0 commit comments

Comments
 (0)