Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jenkinsci/build-timestamp-plugin
Adding BUILD_TIMESTAMP to env variables of the build. Supports Daylight Saving Time.
https://github.com/jenkinsci/build-timestamp-plugin
adopt-this-plugin
Last synced: 3 months ago
JSON representation
Adding BUILD_TIMESTAMP to env variables of the build. Supports Daylight Saving Time.
- Host: GitHub
- URL: https://github.com/jenkinsci/build-timestamp-plugin
- Owner: jenkinsci
- License: mit
- Created: 2015-12-22T22:53:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T03:18:50.000Z (3 months ago)
- Last Synced: 2024-09-30T08:10:04.485Z (3 months ago)
- Topics: adopt-this-plugin
- Language: Java
- Homepage: https://plugins.jenkins.io/build-timestamp/
- Size: 116 KB
- Stars: 0
- Watchers: 104
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# [LOOK FOR NEW MAINTAINER]
# build-timestamp-plugin
Adding `BUILD_TIMESTAMP` to jenkins env vars,## 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`.
Set the timezone to corresponding city, such as `America/New_York` to display Daylight Saving Time format when Daylight Saving Time is enabled.## More vars and formats
Add more var names and formats if you need.## 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.Export build timestamps to build env variables.
# Configure
`BUILD_TIMESTAMP` exported by default, and you can add more variables
with different format patterns in Global Configure page.
![](docs/images/global-config.png)# 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``` syntaxhighlighter-pre
System.getProperty('BUILD_TIMESTAMP')
```Gradle:
``` syntaxhighlighter-pre
System.getenv('BUILD_TIMESTAMP')
```Shell:
``` syntaxhighlighter-pre
"$BUILD_TIMESTAMP"
```# Open Issues
[View these issues in Jira](https://issues.jenkins.io/issues/?jql=resolution%20is%20EMPTY%20and%20component%3D21120)