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

Build job using shared-workspace is generating error when polling for Git source code changes

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Windows Server 2012 Standard, Amazon EC2 m1.medium, Git SCM, Git hosted at Assembla project hosting

      I'm not sure if I have configured something wrong or if I have encountered a glitch in this plug-in. After installing the shared-workspace plug-in I:

      1) created a new shared workspace under "Configure System" on the "Manager Jenkins" page for my Jenkins server
      2) selected the newly created shared workspace from the "Shared Workspace" drop down in the configuration page for the build job intended to use it
      3) entered "${SHAREDSPACE_SCM_URL}" into the "Repository URL" field for the Git repository the build job uses

      The first manual run of the build job resulted in the repository being cloned to the expected default "sharedspace" directory and the build ran successfully. Unfortunately the job which is configured to poll for changes in the configured Git repository is no longer being triggered by changes that are pushed to the repository. The Git polling log for the job shows an error reading:

      "Fetching upstream changes from origin
      ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
      hudson.plugins.git.GitException: Command "fetch -t origin +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout:
      stderr: fatal: '${SHAREDSPACE_SCM_URL}' does not appear to be a git repository
      fatal: Could not read from remote repository."

      It looks like the ${SHAREDSPACE_SCM_URL} token is not being resolved to the correct repository URL unless I have something misconfigured here.

      Thanks in advance for any help with this and if there is a better place for me to log this kind of question please let me know.

          [JENKINS-20059] Build job using shared-workspace is generating error when polling for Git source code changes

          Yeap, the problem is that variable ${SHAREDSPACE_SCM_URL} only initialise when actual build started. Sorry, I've missed other places, where it can be used.
          Plugin should be improved, but right now I don't have much time for that

          BTW, polling - really nasty stuff, you should avoid using it. (http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/)

          Sergey Mylnikov added a comment - Yeap, the problem is that variable ${SHAREDSPACE_SCM_URL} only initialise when actual build started. Sorry, I've missed other places, where it can be used. Plugin should be improved, but right now I don't have much time for that BTW, polling - really nasty stuff, you should avoid using it. ( http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/ )

          Mike Long added a comment -

          Thanks for looking into this Sergey and thanks for the heads up on polling vs triggering, I'll look into it.

          Mike Long added a comment - Thanks for looking into this Sergey and thanks for the heads up on polling vs triggering, I'll look into it.

          Pete W added a comment - - edited

          Is this plugin essentially 'parked' and not ready for production use for now?

          Pete W added a comment - - edited Is this plugin essentially 'parked' and not ready for production use for now?

            sapone Sergey Mylnikov
            mlong072 Mike Long
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: