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

Pipeline jobs do not have access to env.BRANCH

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: gitlab-plugin, pipeline
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.63
      GitLab plugin 1.4.5
    • Similar Issues:

      Description

      So, I've already had to abandon multibranch pipelines because they don't get the gitlab variables that I need for my build. Now, I'm working on a regular pipeline and it doesn't have access to the global BRANCH variable.

      So, I can't do pleasant stage conditions like this

      when {
          branch 'master'
      }
      

      I have to write gnarlier conditions

      when {
          environment name: 'gitlabBranch', value: 'master'
      }
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/Channel.java
            src/main/java/hudson/remoting/Request.java
            http://jenkins-ci.org/commit/remoting/47b20daa35a2277ca67dc97c0e366cee88d13a9c
            Log:
            JENKINS-45233 - Log errors when Response message cannot be delivered due to the closed channel (#177)

            • [FIXED JENKINS-45223] - Print warnings about failed responses when cannot deliver them due to the closed channel
            • Improve logging of the command execution
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/Request.java http://jenkins-ci.org/commit/remoting/47b20daa35a2277ca67dc97c0e366cee88d13a9c Log: JENKINS-45233 - Log errors when Response message cannot be delivered due to the closed channel (#177) [FIXED JENKINS-45223] - Print warnings about failed responses when cannot deliver them due to the closed channel Improve logging of the command execution JENKINS-45233 - Address comments from @jglick JENKINS-45233 - get rid of gratituos synchronization
            Hide
            anthonymastrean Anthony Mastrean added a comment -

            Oleg Nenashev, I think you committed with the wrong ticket ID in your message (see above).

            Show
            anthonymastrean Anthony Mastrean added a comment - Oleg Nenashev , I think you committed with the wrong ticket ID in your message (see above).
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Anthony Mastrean definitely Sorry about that

            Show
            oleg_nenashev Oleg Nenashev added a comment - Anthony Mastrean definitely Sorry about that
            Hide
            anthonymastrean Anthony Mastrean added a comment -

            Oleg Nenashev no worries, didn't want you to have bad release notes later

            Show
            anthonymastrean Anthony Mastrean added a comment - Oleg Nenashev no worries, didn't want you to have bad release notes later
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/hudson/remoting/Channel.java
            src/main/java/hudson/remoting/Request.java
            http://jenkins-ci.org/commit/remoting/b2c6ad1673e37353dd1f5d0e67972a5b1b4151fd
            Log:
            JENKINS-45233 - Log errors when Response message cannot be delivered due to the closed channel (#177)

            • [FIXED JENKINS-45223] - Print warnings about failed responses when cannot deliver them due to the closed channel
            • Improve logging of the command execution
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/remoting/Channel.java src/main/java/hudson/remoting/Request.java http://jenkins-ci.org/commit/remoting/b2c6ad1673e37353dd1f5d0e67972a5b1b4151fd Log: JENKINS-45233 - Log errors when Response message cannot be delivered due to the closed channel (#177) [FIXED JENKINS-45223] - Print warnings about failed responses when cannot deliver them due to the closed channel Improve logging of the command execution JENKINS-45233 - Address comments from @jglick JENKINS-45233 - get rid of gratituos synchronization

              People

              • Assignee:
                owenmehegan Owen Mehegan
                Reporter:
                anthonymastrean Anthony Mastrean
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: