zutil/Jenkinsfile

46 lines
1.1 KiB
Groovy
Executable file

#!groovy
// Jenkinsfile (Pipeline Script)
pipeline {
agent any
tools {
jdk 'jdk-11'
}
environment {
gradleParams = "--info -PreleaseVersion=1.0.${BUILD_NUMBER}" // --no-daemon
}
stages {
stage('Build') {
steps{
withGradle {
sh "chmod +x ./gradlew"
sh "./gradlew ${gradleParams} clean"
sh "./gradlew ${gradleParams} -x test build"
}
}
}
/*
stage('Test') {
steps {
withGradle {
sh "./gradlew ${gradleParams} test"
}
}
}
*/
stage('Deploy') {
steps {
withGradle {
configFileProvider([configFile(fileId: '70cb2022-0bc2-4b25-98a4-e1526dbf2735', variable: 'GRADLE_PROPERTIES')]) {
sh './gradlew ${gradleParams} publishToMavenLocal'
sh './gradlew ${gradleParams} -Prelease -PcustomProperties=${GRADLE_PROPERTIES} publish'
}
}
}
}
}
}