From f1552ef20dc5bc1caef56ee3021893004bc9219f Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 15 Nov 2018 12:40:30 -0800 Subject: [PATCH] Fix changelog classifier, and prevent jenkins from running concurrent builds. And remove caching from setup, as it doesn't use the rangemap. --- Jenkinsfile | 9 ++++----- build.gradle | 17 +++++++---------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a070d06797..886cfafd6c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() } diff --git a/build.gradle b/build.gradle index 5e9f884a44..6ade675d85 100644 --- a/build.gradle +++ b/build.gradle @@ -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