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

cannot use the "pass-through git commit that was built" parameter with triggered jobs


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • 64-bit linux

      I am trying to distribute my test suite jobs to run in parallel by kicking them off from a "master" build job which triggers other jobs. I want all test suites to run against a consistent state of my repository, so I added the "pass-through git commit that was built" parameter. But this causes all sub-jobs to fail with the error message below. This is blocking me from setting up jenkins jobs the way I want.

      I suppose this could be a misconfiguration. But my sub-jobs run fine when they are run individually, and I don't see any git parameter I can add in my sub-job configuration. Ideally, I want the "pass-through git commit" feature to just work without any special re-configuration.

      This is related to issue JENKINS-9049, but that issue's exception is different and it's related to the Gerrit plugin (which I am not using), so I thought I should open a new issue.

      The exception is:

      Started by upstream project "Master" build number 5
      Building on master
      Checkout:workspace / /data/jenkins/jobs/Master-unit_tests/workspace - hudson.remoting.LocalChannel@126be4cc
      Using strategy: Default
      Last Built Revision: Revision 70532721cd3016b4746da4c89a9b7cc85a11bae4 (origin/master)
      Checkout:workspace / /data/jenkins/jobs/Master-unit_tests/workspace - hudson.remoting.LocalChannel@126be4cc
      Fetching changes from the remote Git repository
      Fetching upstream changes from git@git.example.com:my_project.git
      Commencing build of Revision e4d1ff0056235b827934b1d9a0352a6a8f04e286 (detached)
      Checking out Revision e4d1ff0056235b827934b1d9a0352a6a8f04e286 (detached)
      FATAL: no remote from branch name (detached)
      hudson.plugins.git.GitException: no remote from branch name (detached)
      at hudson.plugins.git.GitAPI.setupSubmoduleUrls(GitAPI.java:667)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1158)
      at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1120)
      at hudson.FilePath.act(FilePath.java:758)
      at hudson.FilePath.act(FilePath.java:740)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1120)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1181)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:536)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
      at hudson.model.Run.run(Run.java:1375)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:145)

            kohsuke Kohsuke Kawaguchi
            amurray Adam Murray
            0 Vote for this issue
            1 Start watching this issue