Fix docker tags (#60)

* fixing the regex to publish to bintray

Signed-off-by: Joshua Fernandes <joshua.fernandes@consensys.net>
pull/65/head
Joshua Fernandes 5 years ago committed by GitHub
parent 1ca84871e4
commit f68a1cdb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      Jenkinsfile

11
Jenkinsfile vendored

@ -8,6 +8,10 @@ def shouldPublish() {
return env.BRANCH_NAME == 'master' || env.BRANCH_NAME ==~ /^release-\d+\.\d+/
}
def isSnapshotVersion(v) {
return (v ==~ /.*-SNAPSHOT/)
}
if (shouldPublish()) {
properties([
buildDiscarder(
@ -236,8 +240,7 @@ exit $status
if (env.BRANCH_NAME == 'master') {
additionalTags.add('develop')
}
if (! version ==~ /.*-SNAPSHOT/) {
if (! isSnapshotVersion(version)) {
additionalTags.add('latest')
additionalTags.add(version.split(/\./)[0..1].join('.'))
}
@ -266,7 +269,7 @@ exit $status
}
// we dont publish snapshots to bintray
if (! (version ==~ /.*-SNAPSHOT/)) {
if (! isSnapshotVersion(version)) {
stage(stage_name + 'Prepare') {
sh './gradlew --no-daemon --parallel clean assemble'
@ -303,7 +306,7 @@ exit $status
version = gradleProperties.version
}
if (version ==~ /.*-SNAPSHOT/) { // Only publish snapshots to Azure
if (isSnapshotVersion(version)) { // Only publish snapshots to Azure
stage(stage_name + 'Prepare') {
sh './gradlew --no-daemon --parallel clean assemble'
}

Loading…
Cancel
Save