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

First build fails when executing pre-scm shell script

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: prescmbuildstep-plugin
    • Labels:
      None
    • Environment:
      ubuntu 10.10 slave build nodes (will affect all *nix environments, possibly windows as well)
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          cjo9900 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.

          Show
          cjo9900 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.
          Hide
          scm_issue_link 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]

          Show
          scm_issue_link 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]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: