Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-12770

First build fails when executing pre-scm shell script

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • prescmbuildstep-plugin
    • None
    • ubuntu 10.10 slave build nodes (will affect all *nix environments, possibly windows as well)

      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.

          [JENKINS-12770] First build fails when executing pre-scm shell script

          cjo9900 added a comment -

          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.

          cjo9900 added a comment - 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.

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/org/jenkinsci/plugins/preSCMbuildstep/PreSCMBuildStepsWrapper.java
          http://jenkins-ci.org/commit/pre-scm-buildstep-plugin/5ddb5ce197fe647d8705fac573a8a88cda9b47fb
          Log:
          Create the workspace if it does not exist, allows launcher to start in that location.
          [FIXED JENKINS-12770]

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/org/jenkinsci/plugins/preSCMbuildstep/PreSCMBuildStepsWrapper.java http://jenkins-ci.org/commit/pre-scm-buildstep-plugin/5ddb5ce197fe647d8705fac573a8a88cda9b47fb Log: Create the workspace if it does not exist, allows launcher to start in that location. [FIXED JENKINS-12770]

            cjo9900 cjo9900
            sugarshark Will Stana
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: