[
https://issues.jenkins-ci.org/browse/JENKINS-12770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159261#comment-159261
]
cjo9900 commented on JENKINS-12770:
-----------------------------------
I have also saw this when coping jobs, but didn't have the time to raise the
issue or resolve the problem in the code.
I will add a check to see is the workspace exists, and if it does not, make the
missing directories.
> First build fails when executing pre-scm shell script
> -----------------------------------------------------
>
> Key: JENKINS-12770
> URL: https://issues.jenkins-ci.org/browse/JENKINS-12770
> Project: Jenkins
> Issue Type: Bug
> Components: prescmbuildstep
> Environment: ubuntu 10.10 slave build nodes (will affect all *nix
> environments, possibly windows as well)
> Reporter: Will Stana
> Assignee: cjo9900
>
> The first time a build is run, any pre-scm shell commands will fail.
> This is because the shell scripts use the workspace as the current working
> directory.
> It doesn't seem to be possible to work around this by creating the directory-
> the create directory commands will also fail due to above.
> During the SCM phase of the build, the workspace is created, and so the 2nd
> and subsequent builds will pass. In an environment with a lot of build agents
> (that get re-imaged), this issue creates a lot of headaches for me.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira