Pipeline jobs do not have access to env.BRANCH

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

XMLWordPrintable

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

            Assignee:
            Owen Mehegan
            Reporter:
            Anthony Mastrean
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: