[jbosstools-issues] [JBoss JIRA] (JBIDE-13671) Replace build timestamp in qualifier by last-mod-timestamp from git
Nick Boldt (JIRA)
issues at jboss.org
Fri Apr 29 13:06:00 EDT 2016
[ https://issues.jboss.org/browse/JBIDE-13671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199236#comment-13199236 ]
Nick Boldt edited comment on JBIDE-13671 at 4/29/16 1:05 PM:
-------------------------------------------------------------
Any objections to applying my PR next week so we can get this in place for the next sprint and flesh out any problems with it?
[~dgolovin] [~maxandersen] [~akazakov] [~rob.stryker] [~mmalina] WDYT?
I'm thinking for Jenkins CI builds we should use
x.y.z.$\{BUILD_ALIAS}-vyyyyMMdd-HHmm-CI
where the timestamps come from github.
For local builds, so that OSGi sees them as newer and can therefore be installed with priority over anything else online:
x.y.z.$\{BUILD_ALIAS}-wyyyyMMdd-HHmm (note the 'w' instead of 'v')
Running this PR [1] locally I generated these plugins:
[1] https://github.com/jbosstools/jbosstools-build/pull/215
{code}
mvn clean install -DskipTests
...
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-w20160429-1628.jar
# site/target/repository/features/org.jboss.tools.openshift.express.feature_3.2.0.Alpha1-w20160429-1630.jar
{code}
{code}
mvn clean install -DskipTests -Phudson -DBUILD_NUMBER=1234
...
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-v20160420-1633-CI.jar
# site/target/repository/features/org.jboss.tools.openshift.express.feature_3.2.0.Alpha1-v20160428-2230-CI.jar
{code}
Note that I added jgit.dirtyWorkingTree=ignore. With that, we could ALSO version the locally built stuff using jgit timestamp, if we wanted [2]:
[2] https://github.com/jbosstools/jbosstools-build/pull/216
{code}
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-w20160420-1633.jar
{code}
So now we see the same timestamp as when built using the -Phudson profile, 20160420-1633, but with a 'w' prefix so your local bits will always win against the publishes ones.
And if I commit a change locally and rebuild, now I get the current timestamp of the change in from my local github:
{code}
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-w20160429-1700.jar{code}
was (Author: nickboldt):
Any objections to applying my PR next week so we can get this in place for the next sprint and flesh out any problems with it?
[~dgolovin] [~maxandersen] [~akazakov] [~rob.stryker] [~mmalina] WDYT?
I'm thinking for Jenkins CI builds we should use
x.y.z.$\{BUILD_ALIAS}-vyyyyMMdd-HHmm-CI
where the timestamps come from github.
For local builds, so that OSGi sees them as newer and can therefore be installed with priority over anything else online:
x.y.z.$\{BUILD_ALIAS}-wyyyyMMdd-HHmm (note the 'w' instead of 'v')
Running this PR [1] locally I generated these plugins:
[1] https://github.com/jbosstools/jbosstools-build/pull/215
{code}
mvn clean install -DskipTests
...
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-w20160429-1628.jar
# site/target/repository/features/org.jboss.tools.openshift.express.feature_3.2.0.Alpha1-w20160429-1630.jar
{code}
{code}
mvn clean install -DskipTests -Phudson -DBUILD_NUMBER=1234
...
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-v20160420-1633-CI.jar
# site/target/repository/features/org.jboss.tools.openshift.express.feature_3.2.0.Alpha1-v20160428-2230-CI.jar
{code}
Note that I added jgit.dirtyWorkingTree=ignore. With that, we could ALSO version the locally built stuff using jgit timestamp, if we wanted [2]:
[2] https://github.com/jbosstools/jbosstools-build/pull/216
{code}
# site/target/repository/plugins/org.jboss.tools.foundation.ui_1.3.0.Alpha1-w20160420-1633.jar
{code}
So now we see the same timestamp as when built using the -Phudson profile, 20160420-1633, but with a 'w' prefix so your local bits will always win against the publishes ones.
> Replace build timestamp in qualifier by last-mod-timestamp from git
> -------------------------------------------------------------------
>
> Key: JBIDE-13671
> URL: https://issues.jboss.org/browse/JBIDE-13671
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: build
> Affects Versions: 4.1.0.Alpha1
> Reporter: Nick Boldt
> Assignee: Nick Boldt
> Priority: Optional
> Fix For: 4.4.0.Alpha2
>
> Attachments: jbide13671-before-and-after.png
>
>
> This needs to be added to master parent pom:
> {code}
> <plugin>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>tycho-packaging-plugin</artifactId>
> <version>${tycho.version}</version>
> <dependencies>
> <dependency>
> <groupId>org.eclipse.tycho.extras</groupId>
> <artifactId>tycho-buildtimestamp-jgit</artifactId>
> <version>${tycho-extras.version}</version>
> </dependency>
> </dependencies>
> <configuration>
> <strictBinIncludes>false</strictBinIncludes>
> <format>'v'yyyyMMdd-HHmm</format>
> <timestampProvider>jgit</timestampProvider>
> <jgit.ignore>
> </jgit.ignore>
> </configuration>
> </plugin>
> {code}
> Ref: http://pweclipse.blogspot.ch/2012_09_01_archive.html
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jbosstools-issues
mailing list