My runs are failing, I think due to existence of this suspicious character "%402" in the location addresses. When I check the folder name via terminal this folder name does not exist, while it appears in the Jenkins logs. I wonder anyone has similar experiences.
Here is a snippet from the error log:
Results :
Tests in error:
testMultiThreading(edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotatorTest): java.io.FileNotFoundException: /home/mangipu2/.jenkins/workspace/cogcomp-nlp%402/edison/target/classes/testgazetteers/names (No such file or directory)
testAddView(edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotatorTest): java.io.FileNotFoundException: /home/mangipu2/.jenkins/workspace/cogcomp-nlp%402/edison/target/classes/testgazetteers/names (No such file or directory)
testSimpleGazetteerAnnotatorString(edu.illinois.cs.cogcomp.edison.annotators.SimpleGazetteerAnnotatorTest): java.io.FileNotFoundException: /home/mangipu2/.jenkins/workspace/cogcomp-nlp%402/edison/target/classes/testgazetteers/names (No such file or directory)
testNonLazy(edu.illinois.cs.cogcomp.edison.annotators.AnnotatorLazyInitTest): java.io.FileNotFoundException: /home/mangipu2/.jenkins/workspace/cogcomp-nlp%402/edison/target/classes/testgazetteers/names (No such file or directory)
testLazy(edu.illinois.cs.cogcomp.edison.annotators.AnnotatorLazyInitTest): java.io.FileNotFoundException: /home/mangipu2/.jenkins/workspace/cogcomp-nlp%402/edison/target/classes/testgazetteers/names (No such file or directory)
And the full error log: http://morgoth.cs.illinois.edu:8080/job/cogcomp-nlp/74/console
Edit : Post totally rewrited with the solution.
When you use the "ws" directive in your Jenkinsfile, Jenkins creates multiple workspace folder to execute concurrent build :
You can get more informations on this thread.
The hexadecimal code for the special character "@" is "%40", so the extra character that you see is in fact this "@2" suffix with the encoded "@".
I've analyzed the source code of Jenkins and see that you can override the default character "@" used to build the suffix.
To solve this problem you just have to add the system property "-Dhudson.slaves.WorkspaceList=${new_character}" when you launch your Jenkins Server.
Here is the line of code that load the property from system.
I can see Perforce (P4 Plugin) doesnt like it when there is this @
I am using Amazon Linux so this is what I did to get it working
sudo nano /etc/sysconfig/jenkins
# Added This line
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Duser.timezone=America/Los_Angeles -Dhudson.slaves.WorkspaceList='_'"
I ran into the same problem, but didn't have access to change the Jenkins config. I was able to get it working by manually defining a custom workspace for each sub-stage.
stage('stage1'){
agent {
node {
label 'master'
customWorkspace "${BUILD_TAG}-id"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With