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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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

            Assignee:
            Unassigned
            Reporter:
            Tomasz Bartczak
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: