Skip to end of metadata
Go to start of metadata

Export build timestamps to build env variables.

Plugin Information

View Build Timestamp on the plugin site for more information.

Configure

BUILD_TIMESTAMP exported by default, and you can add more variables with different format patterns in Global Configure page.

Daylight Saving Time

DST is not enabled by default.
If your location uses DST, you can enable it by setting the timezone to the correct city such as America/New_York.

Using timestamps in Maven/Gradle/Shell

They are available in Maven build and Gradle build as built-in properties/variables as well.

Maven:
As defined property in pom, equals to

System.getProperty('BUILD_TIMESTAMP')

Gradle:

System.getenv('BUILD_TIMESTAMP')

Shell:

"$BUILD_TIMESTAMP"

Open Issues

T Key Summary Assignee Reporter P Status Resolution Created Updated Due
Loading...
Refresh

Changes

1.0.3

1.0.2

  • Added Optional date/time shift

    For additional variables you can define shift (days, hours, minutes) which will be added to build timestamp. This allows to run build plan with previous day specified as parameter.

1.0.1

  • Fixed validation issue (combobox does not support validation)

1.0.0

  • Initial release.

2 Comments

  1. Your "Shift timestamp" in the last update crashed my builds.

    1. "Manage Old Data" in Jenkins shows some error.

    The following config is inappropriate any more

      <extraProperties>
        <com.orctom.jenkins.plugin.buildtimestamp.Tuple>
          <key>bla_bla_my_env_variable</key>
          <value>yyyy.MM.dd_HH.mm</value>
        </com.orctom.jenkins.plugin.buildtimestamp.Tuple>
      </extraProperties>

    2. "Export more variables" is empty now.
    3. It has troubles with "Shift timestamp"
    The help for this field says "If not needed may be empty" but this is impossible.
    4. It is impossible to do "Export more variables" > Add

    it3xl.com

     

  2. 1.0.2 blew away my custom variable.  Ran into the same problems with the shift format not matching documentation, but got custom timestamps  working again by using this format:  "- 0 days 0 hours 0 minutes" without the quotes.  Using a "+" didn't satisfy the field validation - neither did blank as documented.  Once an acceptable shift format was supplied, I was able to recreate and save my custom timestamp variable.