Skip to content

Commit

Permalink
[JENKINS-50621] Use temp folders to not pollute workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-arabaolaza committed Apr 26, 2018
1 parent 2703098 commit 81c9601
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions Jenkinsfile
Expand Up @@ -7,16 +7,17 @@
// Test plugin compatibility to latest Jenkins LTS
// Allow failing tests to retry execution
buildPlugin(jenkinsVersions: [null, '2.60.1'],
findbugs: [run: true, archive: true, unstableTotalAll: '0'],
failFast: false)
findbugs: [run: true, archive: true, unstableTotalAll: '0'],
failFast: false)

def branches = [:]

branches["ATH"] = {
node("docker && highmem") {
deleteDir()
def checkoutGit
stage("ATH: Checkout") {
dir("git") {
checkoutGit = pwd(tmp:true) + "/athgit"
dir(checkoutGit) {
checkout scm
sh "mvn clean package -DskipTests"
dir("target") {
Expand All @@ -25,30 +26,32 @@ branches["ATH"] = {
sh "mvn clean"
}
}
def metadataPath = pwd() + "/git/essentials.yml"
def metadataPath = checkoutGit + "/essentials.yml"
stage("Run ATH") {
dir("ath") {
def athFolder=pwd(tmp:true) + "/ath"
dir(athFolder) {
runATH metadataFile: metadataPath
deleteDir()
}
}
}
}
branches["PCT"] = {
node("docker && highmem") {
deleteDir()
def metadataPath
env.RUN_PCT_LOCAL_PLUGIN_SOURCES_STASH_NAME = "localPluginsPCT"
stage("PCT: Checkout") {
dir("git") {
checkout scm
def checkoutGit = pwd(tmp:true) + "/pctgit"
dir(checkoutGit) {
dir("git") {
checkout scm
}
stash name: "localPluginsPCT", useDefaultExcludes: false
}
stash name: "localPluginsPCT", useDefaultExcludes: false

metadataPath = checkoutGit + "/git/essentials.yml"
}
def metadataPath = pwd() + "/git/essentials.yml"

stage("Run PCT") {
dir("pct") {
def pctFolder = pwd(tmp:true) + "/pct"
dir(pctFolder) {
runPCT metadataFile: metadataPath
}
}
Expand Down

0 comments on commit 81c9601

Please sign in to comment.