Skip to content
Permalink
Browse files
[JENKINS-50621] Use temp folders to not pollute workspace
  • Loading branch information
raul-arabaolaza committed Apr 26, 2018
1 parent 2703098 commit 81c9601120e5b0c4862afc13769601fa326e87ce
Showing 1 changed file with 18 additions and 15 deletions.
@@ -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") {
@@ -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
}
}

0 comments on commit 81c9601

Please sign in to comment.