Avoid collision of same commit in same branch
@@ -49,7 +49,10 @@ for (x in slaves) {
workdir = "${base_dir}${commit}/${pyver}"
base_source = "${base_dir}source/${commit}"
sourcedir = "${base_source}/${pyver}"
- if(!fileExists(sourcedir)){ // same commit, same source, no problem
+ while(fileExists(sourcedir)){
+ sourcedir = sourcedir + "_"
+ }
+
dir(base_source){ // Trick to create the parent
def cmd = "python -c \"import shutil; shutil.copytree('${WORKSPACE}', '${sourcedir}')\""
if (slave == "Windows"){
@@ -60,7 +63,6 @@ for (x in slaves) {
}
}
}
- }
if(slave == "Linux"){
docker.image('lasote/conantests').inside("-e CONAN_USER_HOME=${sourcedir} -v${sourcedir}:${sourcedir}") {
