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

"Set build displayname" does not work

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Nothing happens if I activate the option "Build Environment" > "Create Delivery Pipeline version" > "Set build displayname". The display name of the builds of this job are still named #NNN (for example #26).

        Attachments

          Issue Links

            Activity

            Hide
            patbos Patrik Boström added a comment -

            Hi Patrice,

            Versions should be created as early as possible for a pipeline instance, but I can see your point that it should be possible to change/update the version in a later task/job if the version cant be generated in the first job. I suggest that you create a new issue for that.

            Show
            patbos Patrik Boström added a comment - Hi Patrice, Versions should be created as early as possible for a pipeline instance, but I can see your point that it should be possible to change/update the version in a later task/job if the version cant be generated in the first job. I suggest that you create a new issue for that.
            Hide
            7bit Julian M. added a comment -

            Since you tried it successful, I tested a few settings. It seems like it's the pattern. It is not working if you are having an "+" in your pattern.

            My pattern was like 1.6.0+${BUILD_NUMBER}.${SVN_REVISION} (according to Semantic Versioning http://semver.org/ ). No displayname is set if this pattern is choosen.
            If I change it to 1.6.0_${BUILD_NUMBER}, it's working.

            Show
            7bit Julian M. added a comment - Since you tried it successful, I tested a few settings. It seems like it's the pattern. It is not working if you are having an "+" in your pattern. My pattern was like 1.6.0+${BUILD_NUMBER}.${SVN_REVISION} (according to Semantic Versioning http://semver.org/ ). No displayname is set if this pattern is choosen. If I change it to 1.6.0_${BUILD_NUMBER}, it's working.
            Hide
            patbos Patrik Boström added a comment -

            I have now managed to recreate your problem, and it was the pattern that was the problem.
            Unfortunately it is just possible to see the error in the Jenkins log file:

            WARNING: Error creating version
            org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'SVN_REVISION' in '1.6.0+${BUILD_NUMBER}.${SVN_REVISION}'
            	at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:198)
            

            If you change the pattern to:

            1.6.0+${BUILD_NUMBER}.${ENV,var="SVN_REVISION"} 
            

            it works.

            I will add a error message the the console output of the build to it will be easier to see these types of errors.

            Show
            patbos Patrik Boström added a comment - I have now managed to recreate your problem, and it was the pattern that was the problem. Unfortunately it is just possible to see the error in the Jenkins log file: WARNING: Error creating version org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'SVN_REVISION' in '1.6.0+${BUILD_NUMBER}.${SVN_REVISION}' at org.jenkinsci.plugins.tokenmacro.TokenMacro.expand(TokenMacro.java:198) If you change the pattern to: 1.6.0+${BUILD_NUMBER}.${ENV,var="SVN_REVISION"} it works. I will add a error message the the console output of the build to it will be easier to see these types of errors.
            Hide
            7bit Julian M. added a comment -

            Great, thanks for your fast help.

            Show
            7bit Julian M. added a comment - Great, thanks for your fast help.
            Hide
            patbos Patrik Boström added a comment -

            Patrice, I have created JENKINS-21149 for changing pipeline version in later stages/tasks.

            Show
            patbos Patrik Boström added a comment - Patrice, I have created JENKINS-21149 for changing pipeline version in later stages/tasks.

              People

              • Assignee:
                patbos Patrik Boström
                Reporter:
                7bit Julian M.
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: