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

Can't get a human readable job name anymore

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: branch-api-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.32.1, Bitbucket Branch Source Plugin 2.0.0
    • Similar Issues:

      Description

      Since the SCM 2.0 release, I can't find a way, in a pipeline, to get a human-readable job & branch name.

      For example, if I had a BitBucket team called 'Foo', a repository called 'Bar' and a branch 'feature/KEY-Baz', it used to be possible to get a nearly human readable branch - env.BRANCH_NAME would be 'Foo/Bar%2FKEY-Baz', which was easy enough to escape to a human readable form.

      Now, however, it's a shortened form, with numbers in it - something like 'Foo/Bar.qxyz123/feature-KEY.abcd12345ghij-Baz'. And there appears to be no way to get the human readable version. This has broken all of my build notification templates.

      Here's my 'build started' notification, for example:

      hipchatSend color: 'YELLOW', credentialId: 'HipChat', message: "<a href='${env.BUILD_URL}'>${env.JOB_NAME.replace('%2F', '/')} ${env.BUILD_NUMBER}</a> Started", notify: true, room: 'Build Server Messages', sendAs: 'Jenkins', server: '', v2enabled: false
      

        Attachments

          Issue Links

            Activity

            twasink Robert Watkins created issue -
            twasink Robert Watkins made changes -
            Field Original Value New Value
            Comment [ Ack! I just realised something more important - I can't find related projects to do things such as copy artefacts from upstream builds, because the repository name itself now has a suffix. I'll be raising another bug for that. ]
            twasink Robert Watkins made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            stephenconnolly Stephen Connolly made changes -
            Component/s branch-api-plugin [ 18621 ]
            Component/s bitbucket-branch-source-plugin [ 21428 ]
            stephenconnolly Stephen Connolly made changes -
            Assignee Antonio Muñiz [ amuniz ] Stephen Connolly [ stephenconnolly ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "branch-api-plugin#72 (Web Link)" [ 15286 ]
            stephenconnolly Stephen Connolly made changes -
            Remote Link This issue links to "cloudbees-folder-plugin#82 (Web Link)" [ 15287 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            recampbell Ryan Campbell made changes -
            Epic Link JENKINS-41234 [ 177999 ]
            stephenconnolly Stephen Connolly made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1879 (Web Link)" [ 18530 ]
            kshultz Karl Shultz made changes -
            Link This issue causes JENKINS-59756 [ JENKINS-59756 ]

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                twasink Robert Watkins
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: