Workspaces should already be unique to a given concurrent build of Jenkins. You shouldn't have to do anything special to enable this.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/47c32643-6963-47d2-adf0-c288fe7bda35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/opt/mount1/jenkins/jobs/GoogleFlow/workspace
/opt/mount1/jenkins/jobs/GoogleFlow/workspace@2/opt/mount1/jenkins/jobs/GoogleFlow/workspace@3then, the next comes back to/opt/mount1/jenkins/jobs/GoogleFlow/workspacei am not sure why its coming back to this workspace "/opt/mount1/jenkins/jobs/GoogleFlow/workspace" instead of "/opt/mount1/jenkins/jobs/GoogleFlow/workspace@4".My guess is that the first job that was using the /opt/mount1/jenkins/jobs/GoogleFlow/workspace have moved to the next stage and the workspace have been allocated to the 4th job in the series.This creates a mess to my job1's file in the same workspace as the job4. The job4 starts rewriting on them. I have set my workspace to be like so now, so that each instance of the job uses a specific workspace corresponding to the BUILD_NUMBER. (Ignore the messy stupid code for the stages)node("master") { ws("/opt/mount1/jenkins/jobs/GoogleFlow/workspace/${env.BUILD_NUMBER}") { stage name: 'sync', concurrency: 1 echo "before sync" sh '''touch buildFile echo "This is from ${BUILD_NUMBER}" >> buildFile cat buildFile''' sh "sleep 5" echo "after sync" sh "date" stage name: 'build_and_test', concurrency: 1 stage name: 'build' echo "before build" sh "date" sh '''sleep 10 cat buildFile''' echo "build 1/3" sh "sleep 5" echo "build 2/3" sh '''sleep 5 cat buildFile''' echo "build 3/3" sh "date" stage name: 'test', concurrency: 1 echo "before test" sh "date" sh '''sleep 10 cat buildFile''' sh "date" } }I have to decide if i want to delete this workspace after each instance or leave them for debugging. If left, then find a way to purge them. Am putting myself in a cobweb now?? :)
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/i-8gTNug3ck/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANHK%3DJ2SFE5TGQ_2r3oXd8mis7%2Bq__JvetXW45--A6dd%2BsbpDA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPzcO4gepXsj%2BG71eGu3DXPm2kimcN0D8w4rx4F9KMN_o99v2w%40mail.gmail.com.
/opt/mount1/jenkins/jobs/GoogleFlow/workspace/1
/opt/mount1/jenkins/jobs/GoogleFlow/workspace/2/opt/mount1/jenkins/jobs/GoogleFlow/workspace/3/opt/mount1/jenkins/jobs/GoogleFlow/workspace/4.......is there any DSL command to delete these workspaces, once the job succeeds?
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANHK%3DJ1YPT2p7EGQkqxNaNY8Fdq%2B2xZbXbdpVEP72FJArr2x-g%40mail.gmail.com.