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

Zentimestamp plugin no longer compatible with Jenkins 1.597

      With Jenkins 1.597, the environment variable BUILD_ID was changed from timestamp to the build number. The zentimestamp plugin can not alter the content of BUILD_ID anymore. A new environment variable should be introduced, like BUILD_TIMESTAMP. This can be modified by the plugin then.

          [JENKINS-26626] Zentimestamp plugin no longer compatible with Jenkins 1.597

          roma added a comment -

          I'm using Jenkins 1.597 and BUILD_ID. Now, I'm forced to use ZenTimestamp plugin(3.3) to convert Build_ID from BUILD_NUMBER to YYYY-MM-DD_hh-mm-ss. Today (February 5th, 2005) , I found that the timestamp set to BUILD_ID is 2015-02-36_03-53-58. February doesn't have 36 days. Another incompatible issue?

          roma added a comment - I'm using Jenkins 1.597 and BUILD_ID. Now, I'm forced to use ZenTimestamp plugin(3.3) to convert Build_ID from BUILD_NUMBER to YYYY-MM-DD_hh-mm-ss. Today (February 5th, 2005) , I found that the timestamp set to BUILD_ID is 2015-02-36_03-53-58. February doesn't have 36 days. Another incompatible issue?

          rome That is not a compatibility bug. You're using `DD` (upper case) which is day in year, so January (31 days) + February 5th (5 days) = 36 days. Instead you should use `dd` (lower case) which will show the day in month. See http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for more information.

          Steven Christou added a comment - rome That is not a compatibility bug. You're using `DD` (upper case) which is day in year , so January (31 days) + February 5th (5 days) = 36 days. Instead you should use `dd` (lower case) which will show the day in month . See http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html for more information.

          Code changed in jenkins
          User: christ66
          Path:
          pom.xml
          src/ittest/java/hudson/plugins/zentimestamp/ZenTimestampJobPropertyTest.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampAction.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampNodeProperty.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampRunListener.java
          src/main/resources/hudson/plugins/zentimestamp/Messages.properties
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper/help-pattern.html
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/config.properties
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/help-changeBUILDID.html
          src/main/resources/index.jelly
          src/main/webapp/help-node.html
          http://jenkins-ci.org/commit/zentimestamp-plugin/3bbe8cfc2c77ee663d68e2f64914edaee5981add
          Log:
          JENKINS-26626 Switch to use BUILD_TIMESTAMP environment variable instead of the BUILD_ID. Newer versions of Jenkins use the BUID_ID as being the build number.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: christ66 Path: pom.xml src/ittest/java/hudson/plugins/zentimestamp/ZenTimestampJobPropertyTest.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampAction.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampNodeProperty.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampRunListener.java src/main/resources/hudson/plugins/zentimestamp/Messages.properties src/main/resources/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper/help-pattern.html src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/config.properties src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/help-changeBUILDID.html src/main/resources/index.jelly src/main/webapp/help-node.html http://jenkins-ci.org/commit/zentimestamp-plugin/3bbe8cfc2c77ee663d68e2f64914edaee5981add Log: JENKINS-26626 Switch to use BUILD_TIMESTAMP environment variable instead of the BUILD_ID. Newer versions of Jenkins use the BUID_ID as being the build number.

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          pom.xml
          src/ittest/java/hudson/plugins/zentimestamp/ZenTimestampJobPropertyTest.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampAction.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampNodeProperty.java
          src/main/java/hudson/plugins/zentimestamp/ZenTimestampRunListener.java
          src/main/resources/hudson/plugins/zentimestamp/Messages.properties
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper/help-pattern.html
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/config.properties
          src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/help-changeBUILDID.html
          src/main/resources/index.jelly
          src/main/webapp/help-node.html
          http://jenkins-ci.org/commit/zentimestamp-plugin/d0489822ae9081a09b63ccf413302973e25686bb
          Log:
          Merge pull request #1 from christ66/JENKINS-26626

          JENKINS-26626 Switch to use BUILD_TIMESTAMP environment variable

          Compare: https://github.com/jenkinsci/zentimestamp-plugin/compare/c04098bcef9f...d0489822ae90

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: pom.xml src/ittest/java/hudson/plugins/zentimestamp/ZenTimestampJobPropertyTest.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampAction.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampEnvironmentContributor.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampNodeProperty.java src/main/java/hudson/plugins/zentimestamp/ZenTimestampRunListener.java src/main/resources/hudson/plugins/zentimestamp/Messages.properties src/main/resources/hudson/plugins/zentimestamp/ZenTimestampFormatBuildWrapper/help-pattern.html src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/config.properties src/main/resources/hudson/plugins/zentimestamp/ZenTimestampJobProperty/help-changeBUILDID.html src/main/resources/index.jelly src/main/webapp/help-node.html http://jenkins-ci.org/commit/zentimestamp-plugin/d0489822ae9081a09b63ccf413302973e25686bb Log: Merge pull request #1 from christ66/ JENKINS-26626 JENKINS-26626 Switch to use BUILD_TIMESTAMP environment variable Compare: https://github.com/jenkinsci/zentimestamp-plugin/compare/c04098bcef9f...d0489822ae90

          The PR was merged, so I am marking as fixed.

          The Zentimestamp plugin will use the `BUILD_TIMESTAMP` environment variable instead of the `BUILD_ID`.

          Steven Christou added a comment - The PR was merged, so I am marking as fixed. The Zentimestamp plugin will use the `BUILD_TIMESTAMP` environment variable instead of the `BUILD_ID`.

          Michael Rentschler added a comment - - edited

          With older Jenkins versions, the timestamp environment variable (formerly BUILD_ID) was
          already set to the default timestamp format by the Jenkins core and was only modified by the Zen Timestamp plugin if the option "Change date pattern" was checked (inside the job or node configuration) and a different format was selected.

          The new Zen plugin must be fixed to set the BUILD_TIMESTAMP variable in any case, even if there was no format defined inside the job or node configuration, by using the default timestamp format. This must be done by the plugin now, since BUILD_TIMESTAMP is not set by the core anymore.

          Michael Rentschler added a comment - - edited With older Jenkins versions, the timestamp environment variable (formerly BUILD_ID) was already set to the default timestamp format by the Jenkins core and was only modified by the Zen Timestamp plugin if the option "Change date pattern" was checked (inside the job or node configuration) and a different format was selected. The new Zen plugin must be fixed to set the BUILD_TIMESTAMP variable in any case , even if there was no format defined inside the job or node configuration, by using the default timestamp format. This must be done by the plugin now, since BUILD_TIMESTAMP is not set by the core anymore .

          It must be right enough to install the Zen Timestamp plugin, then the BUILD_TIMESTAMP environment variable should be set for each build, using the default/legacy timestamp format. No further configuration needed, unless the timestamp format must be changed.

          Michael Rentschler added a comment - It must be right enough to install the Zen Timestamp plugin, then the BUILD_TIMESTAMP environment variable should be set for each build, using the default/legacy timestamp format. No further configuration needed, unless the timestamp format must be changed.

          Chris Tobey added a comment -

          This should also expose the BUILD_TIMESTAMP for jenkins pre-1.597 so that this plugin can be applied, jobs can be updated to use the BUILD_TIMESTAMP variable, and then Jenkins can be updated separately and at a later time, with no changes needed.

          Chris Tobey added a comment - This should also expose the BUILD_TIMESTAMP for jenkins pre-1.597 so that this plugin can be applied, jobs can be updated to use the BUILD_TIMESTAMP variable, and then Jenkins can be updated separately and at a later time, with no changes needed.

          From 4.x, the zentimestamp plugin uses the BUILD_TIMESTAMP variable.

          Gregory Boissinot added a comment - From 4.x, the zentimestamp plugin uses the BUILD_TIMESTAMP variable.

          For populate a BUILD_TIMESTAMP in any case, please make another issue.

          Gregory Boissinot added a comment - For populate a BUILD_TIMESTAMP in any case, please make another issue.

            schristou Steven Christou
            mre_mchp Michael Rentschler
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: