Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit 504b8f3

Browse files
author
Frode Sjovatsen
committed
Updated jenkins
1 parent 06ba05d commit 504b8f3

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Jenkinsfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,28 @@ pipeline {
22
agent {
33
docker {
44
label 'docker'
5-
image 'gradle:4.10.2-jdk8-alpine'
5+
image 'gradle:4.10.3-jdk8-alpine'
66
}
77
}
88
stages {
99
stage('Build') {
1010
steps {
1111
sh 'gradle --no-daemon clean build'
12-
stash includes: 'build/libs/*.jar', name: 'libs'
1312
}
1413
}
1514
stage('Deploy') {
1615
environment {
1716
REPOSILITE = credentials('reposilite')
1817
}
1918
when {
20-
branch 'master'
19+
tag pattern: "v\\d+\\.\\d+\\.\\d+(-\\w+-\\d+)?", comparator: "REGEXP"
2120
}
2221
steps {
23-
unstash 'libs'
24-
sh "gradle --no-daemon -PreposiliteUsername=${REPOSILITE_USR} -PreposiliteToken=${REPOSILITE_PSW} publish"
22+
script {
23+
VERSION = TAG_NAME[1..-1]
24+
}
25+
sh "echo Version is ${VERSION}"
26+
sh "gradle --no-daemon -Pversion=${VERSION} -PreposiliteUsername=${REPOSILITE_USR} -PreposiliteToken=${REPOSILITE_PSW} publish"
2527
}
2628
}
2729
}

0 commit comments

Comments
 (0)