Tag Archive for 'jenkins'

Changing Jenkins concurrent job token from @ to something else

Some jobs may fail in Jenkins when running concurrently because they don’t like the @ symbol in the path.

For example, you may get a jobs at something like:

  • /var/lib/jenkins/jobs/cool-project
  • /var/lib/jenkins/jobs/cool-project@2

This can be easily changed to something else, as per the Jenkins system properties page by modifying the -D arguments sent to Java. I’ve changed it to _job_ at the moment.


echo 'JAVA_ARGS="$JAVA_ARGS -Dhudson.slaves.WorkspaceList=_job_"'\
 >> /etc/default/jenkins
systemctl restart jenkins

Now concurrent jobs will be something like:

  • /var/lib/jenkins/jobs/cool-project
  • /var/lib/jenkins/jobs/cool-project_job_2

Which seems much nicer to me.