2020-02-16 13:27:18 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2020-02-16 13:33:10 +01:00
|
|
|
stage('Clean') {
|
|
|
|
steps {
|
|
|
|
sh './gradlew clean --no-daemon'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-16 13:27:18 +01:00
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2020-02-16 13:33:10 +01:00
|
|
|
sh './gradlew build --no-daemon'
|
|
|
|
}
|
|
|
|
}
|
2020-02-16 13:27:18 +01:00
|
|
|
|
2020-02-16 13:33:10 +01:00
|
|
|
stage('Upload Artifacts') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts 'build/libs/**.jar'
|
2020-02-16 13:27:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-16 13:53:21 +01:00
|
|
|
stage('Publish') {
|
2020-03-05 00:40:27 +01:00
|
|
|
when {
|
2020-11-07 00:43:27 +01:00
|
|
|
branch 'main'
|
2020-03-05 00:40:27 +01:00
|
|
|
}
|
2020-02-16 13:53:21 +01:00
|
|
|
steps {
|
|
|
|
sh './gradlew publish --no-daemon'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-16 13:27:18 +01:00
|
|
|
}
|
2020-02-16 14:45:19 +01:00
|
|
|
environment {
|
|
|
|
local_maven = '/var/www/maven'
|
|
|
|
}
|
2020-03-05 00:40:27 +01:00
|
|
|
}
|