mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
41 lines
898 B
Groovy
41 lines
898 B
Groovy
#!/usr/bin/env groovy
|
|
|
|
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Clean') {
|
|
steps {
|
|
echo 'Cleaning Project'
|
|
sh 'chmod +x gradlew'
|
|
sh './gradlew clean --no-daemon'
|
|
}
|
|
}
|
|
stage('Build and Deploy Release') {
|
|
when {
|
|
tag 'release-*'
|
|
}
|
|
environment {
|
|
RELEASE_MODE = '1'
|
|
}
|
|
steps {
|
|
sh './gradlew build publish --no-daemon'
|
|
}
|
|
}
|
|
stage('Build and Deploy Snapshot') {
|
|
when {
|
|
not {
|
|
tag 'release-*'
|
|
}
|
|
}
|
|
steps {
|
|
sh './gradlew build publish --no-daemon'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts 'build/libs/**.jar'
|
|
}
|
|
}
|
|
}
|