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

Provide easy access to git branch name in multibranch workflow scripts

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • branch-api-plugin
    • None

      Popular maven plugins designed to give you access to the git branch name are ineffective when using the workflow Multibranch Plugin.

      For multbranch builds it's reasonable to expect use cases where the branch info is use to augment artifact names and manifest entries so people can easily distinguish branch built artifacts from one.

      Would be nice if the DSL just made this state available - but populating the env would be a nice start.

          [JENKINS-30252] Provide easy access to git branch name in multibranch workflow scripts

          Ronald Pomeroy created issue -
          Ronald Pomeroy made changes -
          Comment [ I tried to log out the env.JOB_NAME

          with echo " *** ${env.JOB_NAME} *** "

          and got
          ...
          Running: Print Message
          *** ${env.JOB_NAME} ***
          ... ]
          Jesse Glick made changes -
          Labels New: multibranch
          Jesse Glick made changes -
          Remote Link New: This issue links to "Stack Overflow (Web Link)" [ 13165 ]
          Jesse Glick made changes -
          Link New: This issue is blocking JENKINS-30744 [ JENKINS-30744 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-24141 [ JENKINS-24141 ]
          Jesse Glick made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Component/s New: branch-api-plugin [ 18621 ]
          Component/s Original: workflow-plugin [ 18820 ]
          Jesse Glick made changes -
          Labels Original: multibranch
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 12 (Web Link)" [ 13403 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

            jglick Jesse Glick
            rpomeroy Ronald Pomeroy
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: