1
0
tdlight-java-natives-osx-amd64/Jenkinsfile
2020-10-03 13:48:05 +02:00

50 lines
1.1 KiB
Groovy

#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
environment {
MVN_SET = credentials('maven_settings')
}
agent { docker { image 'maven:3.6.3' } }
triggers {
pollSCM "* * * * *"
}
options {
timestamps()
ansiColor("xterm")
}
parameters {
booleanParam(name: "RELEASE",
description: "Build a release from current commit.",
defaultValue: false)
}
stages {
stage("Build & Deploy SNAPSHOT") {
steps {
sh "mvn -s $MVN_SET -B deploy"
}
}
stage("Release") {
when {
expression { params.RELEASE }
}
steps {
sh "mvn -s $MVN_SET -B release:prepare"
sh "mvn -s $MVN_SET -B release:perform"
}
}
stage('Deliver') {
steps {
sh './jenkins/scripts/deliver.sh'
}
}
}
post {
always {
deleteDir()
}
}
}