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

Displayed Build version does not interpret parameters

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a parameterized build with the following version number format string

      $BUILD_VERSION_PREFIX.${BUILDS_ALL_TIME,XX}

      Where $BUILD_VERSION_PREFIX is the parameter.

      While the version is properly generated for ant builds (as parameter), on the GUI it displays like this:

      $BUILD_VERSION_PREFIX.02

      see also screenshot.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Deniz Bahadir
          Path:
          src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java
          http://jenkins-ci.org/commit/versionnumber-plugin/30e9ebdbbe44c6f1f5bfb4c7fcebd65dd0a2ee14
          Log:
          JENKINS-15371 Extended (environment-)variable substition.

          Environment-variables, used in the version-number's format-string no
          longer need to be in format "${MYVAR}", "$MYVAR" work now, too.

          However, variables accessing the plugins' variables (e.g. BUILDS_TODAY,
          BUILDS_ALL_TIME, etc.) still must be enclosed in braces.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Deniz Bahadir Path: src/main/java/org/jvnet/hudson/tools/versionnumber/VersionNumberCommon.java http://jenkins-ci.org/commit/versionnumber-plugin/30e9ebdbbe44c6f1f5bfb4c7fcebd65dd0a2ee14 Log: JENKINS-15371 Extended (environment-)variable substition. Environment-variables, used in the version-number's format-string no longer need to be in format "${MYVAR}", "$MYVAR" work now, too. However, variables accessing the plugins' variables (e.g. BUILDS_TODAY, BUILDS_ALL_TIME, etc.) still must be enclosed in braces.
          Hide
          bahadir Deniz Bahadir added a comment -

          Without any changes it would have been possible to use

          ${BUILD_VERSION_PREFIX}.${BUILDS_ALL_TIME,XX}
          

          instead of:

          $BUILD_VERSION_PREFIX.${BUILDS_ALL_TIME,XX}
          

          However, commit 30e9ebd extends the behavior, so that the braces can be omitted (for environment-variables).

          This will go into the next release. (Either 1.7.3 or 1.8.)

          Show
          bahadir Deniz Bahadir added a comment - Without any changes it would have been possible to use ${BUILD_VERSION_PREFIX}.${BUILDS_ALL_TIME,XX} instead of: $BUILD_VERSION_PREFIX.${BUILDS_ALL_TIME,XX} However, commit 30e9ebd extends the behavior, so that the braces can be omitted (for environment-variables). This will go into the next release. (Either 1.7.3 or 1.8.)

            People

            • Assignee:
              bahadir Deniz Bahadir
              Reporter:
              rburgst2 Rainer Burgstaller
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: