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

"Branch to merge to" should accept environment variables especially ${GIT_BRANCH}

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • jenkins 1.504, git 1.2

      What I want to do is to give jenkins two git repos (local, remote)
      and make him build every commit in any branch from local, for each of them merge with the same branch from remote.

      so my branch spec is local/**

      and before build I want to merge with remote with the same branch. local is a clone of remote, and they get synchronized often.

      Where i failed is that i specified in "Branch to merge to" value ${GIT_BRANCH}, but this didn't get resolved, and i saw

      ------------

      Merging Revision 71130601881ca2da83c7969e5a21093f5accbe28 (local/master) onto ${GIT_BRANCH}
      FATAL: Command "git rev-parse unfuddle/${GIT_BRANCH}^

      {commit}" returned status code 128:
      stdout: unfuddle/local/master^{commit}

      stderr: fatal: ambiguous argument 'unfuddle/local/master^

      {commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions
      hudson.plugins.git.GitException: Command "git rev-parse unfuddle/${GIT_BRANCH}^{commit}

      " returned status code 128:
      stdout: unfuddle/local/master^

      {commit}
      stderr: fatal: ambiguous argument 'unfuddle/local/master^{commit}

      ': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions

            Unassigned Unassigned
            kretes Tomasz Bartczak
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: