2019-05-04 04:59:07 +00:00
|
|
|
@Library('forge-shared-library')_
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
}
|
|
|
|
agent {
|
|
|
|
docker {
|
2021-04-23 23:51:09 +00:00
|
|
|
image 'gradle:jdk8'
|
|
|
|
args '-v forgegc:/home/gradle/.gradle/'
|
2019-05-04 04:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
|
|
|
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('fetch') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('setup') {
|
|
|
|
steps {
|
2021-04-23 23:49:27 +00:00
|
|
|
withGradle {
|
2021-04-23 23:54:36 +00:00
|
|
|
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies'
|
2021-04-23 23:49:27 +00:00
|
|
|
}
|
2019-05-04 04:59:07 +00:00
|
|
|
script {
|
2019-05-04 05:41:27 +00:00
|
|
|
env.MYVERSION = sh(returnStdout: true, script: './gradlew :properties -q | grep "^version:" | awk \'{print $2}\'').trim()
|
2019-05-04 04:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('changelog') {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
changeRequest()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2019-05-04 07:51:02 +00:00
|
|
|
writeChangelog(currentBuild, "build/BiomesOPlenty-${env.MYVERSION}-changelog.txt")
|
2019-05-04 04:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('publish') {
|
|
|
|
when {
|
|
|
|
not {
|
|
|
|
changeRequest()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
environment {
|
2019-05-25 03:43:58 +00:00
|
|
|
CURSE_API_KEY = credentials('curse-api-key')
|
2019-05-04 04:59:07 +00:00
|
|
|
}
|
|
|
|
steps {
|
2021-04-23 23:49:27 +00:00
|
|
|
withGradle {
|
2021-04-23 23:59:09 +00:00
|
|
|
sh './gradlew ${GRADLE_ARGS} :uploadArchives curseforge -PcurseApiKey=${CURSE_API_KEY}'
|
2021-04-23 23:49:27 +00:00
|
|
|
}
|
2019-05-04 04:59:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|