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

Job does not resolve {GIT_BRANCH} token on first job run. Need a branch env name for build

    Details

    • Similar Issues:

      Description

      Original reporter Pavel Batanov

      When branch job just created it does not resolve token `${GIT_BRANCH}` and (i.e. origin/release/release_name) and leaves it as `${GIT_BRANCH}` plaintext.

      I'm using tokens within template to separate job workspaces via custom workspace option (i.e. `\var\www\${GIT_BRANCH}`) to deploy branches on stagin env.

      As it leaves token plaintexted it performs first build in `/var/www/${GIT_BRANCH}` directory. But after git clone is finished it the `${GIT_BRANCH}` token is being expanded correctly and phing starts to use it to lookup build plan. And it expands to /var/www/origin/release/release_name which is correct but mismatched with the actual clone path.

      I really understand that problem is that workspace is resolved before cloning and it is not really the bug or problem of plugin. But I need the way to get fully qualified branch name (origin/release/release_name) as a token instead of ${GIT_BRANCH}.

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                mjdetullio Matthew DeTullio
                Reporter:
                mjdetullio Matthew DeTullio
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: