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

GIT_BRANCH_SHORT for branch name without release/, feature/, etc. Just the bit after the '/'

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      For cases where a filename expansion is needed for the git branch name, thre cannot be a '/' in a filename, so that part of the branch needs to be dropped.
      ie:
      GIT_BRANCH=release/blue-fish
      then:
      GIT_BRANCH_SHORT=blue-fish

      Seems like a simple thing to do in the plugin, but not possible to do in a job.

          [JENKINS-21421] GIT_BRANCH_SHORT for branch name without release/, feature/, etc. Just the bit after the '/'

          Bruce Edge created issue -
          Bruce Edge made changes -
          Summary Original: Need a variable for getting branch name without release/, feature/, etc. Just the bit after the '/' New: GIT_BRANCH_SHORT for branch name without release/, feature/, etc. Just the bit after the '/'
          Bruce Edge made changes -
          Description Original: For cases where a filename expansion is needed for the git branch name, thre cannot be a '/' in a filename, so that part of the branch needs to be dropped.
          ie: expand "release/blue-fish" to "blue-fish"

          Maybe a GIT_BRANCH_SHORT variable?

          Seems like a simple thing to do in the plugin, but painful to do in a job.
          New: For cases where a filename expansion is needed for the git branch name, thre cannot be a '/' in a filename, so that part of the branch needs to be dropped.
          ie:
          GIT_BRANCH=release/blue-fish
          then:
          GIT_BRANCH_SHORT=blue-fish

          Seems like a simple thing to do in the plugin, but not possible to do in a job.
          Horst Krause made changes -
          Link New: This issue is related to JENKINS-20446 [ JENKINS-20446 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 153287 ] New: JNJira + In-Review [ 178481 ]
          Mark Waite made changes -
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Nicolas De Loof made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

            Unassigned Unassigned
            bedge Bruce Edge
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: