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

          Michael Rentschler created issue -
          Michael Rentschler made changes -
          Description Original: As of version 3.0 the zen timestamp plugin appears to be no longer compatible with Hudson. I tested it in a stand alone Hudson instance (no additional plugins) against Hudson versions 2.2.0 and 2.1.0 and noticed that the BUILD_ID variable is not getting replaced by the correct pattern.

          I rolled back to version 2.2 of the plugin which appears to still be compatible with both versions of Hudson above.

          I did not see any errors in the logs when running projects with the plugin activated, only that the environment variable contained the original timestamp formatting.
          New: 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.
          Michael Rentschler made changes -
          Link New: This issue is related to JENKINS-24380 [ JENKINS-24380 ]
          Michael Rentschler made changes -
          Link New: This issue is related to JENKINS-26624 [ JENKINS-26624 ]
          Michael Rentschler made changes -
          Link New: This issue is related to JENKINS-26520 [ JENKINS-26520 ]

          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.
          Steven Christou made changes -
          Remote Link New: This issue links to "PR 1 (Web Link)" [ 12600 ]

          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

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

              Created:
              Updated:
              Resolved: