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

Git Polling fails for job restricted to Mac OS X slave (with Windows master)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • Windows master, Mac slave

      I have defined two installations of git on our Windows master node:
      Default: git.exe (found in the PATH)
      Mac: /usr/local/bin/git (not found in the PATH)

      I have certain jobs that must run on a Mac. For those jobs, I have selected "Mac" for the git executable.

      When those jobs try to poll github for changes, they get errors like this:
      Started on Aug 5, 2014 6:38:03 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision 33ce43e454fd2447f548f18dc3bc404ff1a2b021 (origin/release)
      > /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release # timeout=10
      FATAL: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
      hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
      at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459)
      at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
      at hudson.scm.SCM.poll(SCM.java:374)
      ...
      Caused by: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1414)
      ...
      Caused by: java.io.IOException: Cannot run program "/usr/local/bin/git": CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessBuilder.start(Unknown Source)
      ...
      Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessImpl.create(Native Method)
      ...

      I presume this fails because it is looking for /usr/local/bin/git on the Windows master node.
      When I manually build the job with that configuration - git works fine.
      If I switch the job's configuration to use the "Default" git executable (git.exe), then polling works fine, but when the job tries to run on the Mac then the git commands fail (since git.exe is not found on the Mac).

      So, until this issue is resolved somehow, either
      a) no jobs are started automatically, but they all build successfully when launched manually, or
      b) jobs are started automatically - but then they all fail to build.

      The job in question clones a specific branch of a repository from github.
      It is restricted to work on a slave node with the label of "iOS".
      There is a mac slave node with that label.
      We are running the latest LTS version (1.565.1) of Jenkins on a Windows server.

      FYI - this behavior worked fine on an older (1.x) version of this plugin.

      Thanks,
      Chuck

        1. Mobile-iOS-develop-config.xml
          2 kB
          Charles Doucette
        2. GitPollingLog.txt
          3 kB
          Charles Doucette

            Unassigned Unassigned
            cdoucette Charles Doucette
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: