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

      Original reporter scaytrase

      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}.

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

          Matthew DeTullio created issue -
          Matthew DeTullio made changes -
          Description Original: 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}.
          New: Original reporter [~scaytrase]

          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}.
          Matthew DeTullio made changes -
          Description Original: Original reporter [~scaytrase]

          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}.
          New: Original reporter [~scaytrase]

          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}.
          Adrien Lecharpentier made changes -
          Description Original: Original reporter [~scaytrase]

          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}.
          New: Original reporter [~scaytrase]

          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}.
          Adrien Lecharpentier made changes -
          Description Original: Original reporter [~scaytrase]

          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}.
          New: Original reporter [~scaytrase]

          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}.
          Matthew DeTullio made changes -
          Component/s New: git-plugin [ 15543 ]
          Matthew DeTullio made changes -
          Link New: This issue duplicates JENKINS-32244 [ JENKINS-32244 ]
          Matthew DeTullio made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Matthew DeTullio made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Matthew DeTullio made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: