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

Variables are not injected by core if the SCM checkout phase fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Ubuntu 12.04 LTS
      Perforce r14.2
      OpenJDK 1.6
      Jenkins 1.565.3

      During the SCM check-out phase (in this case Perforce), if the SCM phase fails, Jenkins will send an email with unexpanded variables.

      For example, given the following job log:

      Started by upstream project "sample-job-controller" build number 244
      
      originally caused by:
       Started by timer
      
      Building remotely on USCBMBLDP240 (x86_64 mac-10.9.5 x86_64-mac-10.9.5 x86_64-mac mac xcode6.0 xcode6.1 osx10.9 10.9.5) in workspace /Users/build/jenkins/workspace/sample-job-alpha
      
      Using remote perforce client: sample-job-alpha-USCBMBLDP240-1688766888
      
      Caught exception communicating with perforce. No output for: /usr/local/bin/p4 -P ... workspace -o sample-job-alpha-USCBMBLDP240-1688766888 com.tek42.perforce.PerforceException: No output for: /usr/local/bin/p4 -P ... workspace -o sample-job-alpha-USCBMBLDP240-1688766888 
        at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:408)
        at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301)
        at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
        at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1641)
        at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1602)
        at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:907)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1252
        at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615)
        at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524)
        at hudson.model.Run.execute(Run.java:1706)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:232)
      ERROR: Unable to communicate with perforce. No output for: /usr/local/bin/p4 -P ... workspace -o sample-job-alpha-USCBMBLDP240-1688766888 
      Email was triggered for: Failure - Any
      Sending email for trigger: Failure - Any
      Sending email to: [hidden email address]
      
      Deleting project workspace... 
      done
       
      Finished: FAILURE
      

      We received the following email:

      From: Jenkins Build 
      Sent: Tuesday, March 3, 2015 9:34 AM
      To: [hidden email address]
      Subject: $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
      
      sample-job-alpha - Build # 186 - Failure:
      
      Check console output at http://jenkins.sonos.com/main/job/sample-job-alpha/186/ to view the results.
      

            Unassigned Unassigned
            mdelaney Mike Delaney
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: