Skip to content

Commit 1cc9391

Browse files
committed
Make some final tweaks/fixes to Jenkins pipeline
1 parent 57d74e1 commit 1cc9391

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

Jenkinsfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ pipeline {
88
}
99
}
1010

11+
options {
12+
buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '20')
13+
}
14+
1115
parameters {
12-
string name: 'RELEASE_VERSION', defaultValue: '', description: '(leave blank for current snapshot)', trim: true
16+
string name: 'RELEASE_VERSION', defaultValue: '', description: '(e.g., 1.0.0, leave blank for current snapshot)', trim: true
1317
}
1418

1519
stages {
@@ -23,10 +27,8 @@ pipeline {
2327
steps {
2428
dir("repo/") {
2529
script {
26-
def isRelease = params.RELEASE_VERSION != ""
27-
28-
if (isRelease) {
29-
sh "atlas-mvn versinos:set -DnewVersion=${params.RELEASE_VERSION}"
30+
if (params.RELEASE_VERSION != "") {
31+
sh "atlas-mvn versions:set -DnewVersion=${params.RELEASE_VERSION}"
3032
}
3133
}
3234

@@ -41,7 +43,7 @@ pipeline {
4143
archiveArtifacts artifacts: 'repo/target/codedx-bamboo-plugin*.jar', fingerprint: true, onlyIfSuccessful: true
4244

4345
script {
44-
if (isRelease) {
46+
if (params.RELEASE_VERSION != "") {
4547
currentBuild.displayName = params.RELEASE_VERSION
4648
currentBuild.description = "Release build ${params.RELEASE_VERSION}"
4749
currentBuild.setKeepLog(true)

0 commit comments

Comments
 (0)