Fix changelog classifier, and prevent jenkins from running concurrent builds.

And remove caching from setup, as it doesn't use the rangemap.
This commit is contained in:
LexManos 2018-11-15 12:40:30 -08:00
parent de7eeed916
commit f1552ef20d
2 changed files with 11 additions and 15 deletions

9
Jenkinsfile vendored
View File

@ -1,6 +1,9 @@
@Library('forge-shared-library')_
pipeline {
options {
disableConcurrentBuilds()
}
agent {
docker {
image 'gradlewrapper:latest'
@ -19,11 +22,7 @@ pipeline {
}
stage('setup') {
steps {
cache(maxCacheSize: 250/*MB*/, caches: [
[$class: 'ArbitraryFileCache', excludes: '', includes: 'output.txt', path: '${WORKSPACE}/projects/forge/build/extractRangeMap/'] //Cache the rangemap to help speed up builds
]){
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
}
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies --continue setup'
script {
env.MYVERSION = sh(returnStdout: true, script: './gradlew :forge:properties -q | grep "version:" | awk \'{print $2}\'').trim()
}

View File

@ -242,15 +242,9 @@ project(':forge') {
rootProject.file('LICENSE.txt')
]
def jenkinsChangelog = rootProject.file('build/changelog.txt')
def changelog = file("build/libs/${project.name}-${project.version}-changelog.txt")
if (jenkinsChangelog.exists()) {
if (!changelog.parentFile.exists())
changelog.parentFile.mkdirs()
java.nio.file.Files.copy(jenkinsChangelog.toPath(), changelog.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING)
def changelog = rootProject.file('build/changelog.txt')
if (changelog.exists())
extraTxts += changelog
println extraTxts
}
task downloadCrowdin() {
ext {
@ -749,8 +743,11 @@ project(':forge') {
publications {
mavenJava(MavenPublication) {
artifact universalJar
if (changelog.exists())
artifact changelog
if (changelog.exists()) {
artifact(changelog) {
classifier = 'changelog'
}
}
artifact installerJar
//TODO: installer-win
artifact makeMdk