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

Pipeline jobs do not have access to env.BRANCH

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Duplicate
    • gitlab-plugin, pipeline
    • None
    • Jenkins ver. 2.63
      GitLab plugin 1.4.5

    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

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

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

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

            anthonymastrean definitely Sorry about that

            oleg_nenashev Oleg Nenashev added a comment - anthonymastrean definitely Sorry about that

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

            anthonymastrean Anthony Mastrean added a comment - oleg_nenashev no worries, didn't want you to have bad release notes later

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

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

              Dates

                Created:
                Updated:
                Resolved: