[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [tycho-user] Reproducible Version Qualifiers with only using the git info
|
> Yes, having the `jgit` timestamp provider would do this for bundles
as well.
I'm just uncertain as the documentation says:
"Version qualifier is calculated based on timestamp of the most recent
commit that touches any file under project base directory"
so project basedir = "bundle" and not "git-tree"?
> strategy that only uses Git timestamp to build qualifier is likely to
> build and distribute different artifacts with same fully qualified
> version, and that is against the expectations of good versioning.
for my case there is only one build-server and we only distribute the
"master" branch to update products (in contrast of download the build
zip and unpack them again) so it seems manageable and I would expect
that if nothing has changed in the source tree that the build-result is
the same.
> But it would still be possible to build such a strategy
would I need a new one or could the jgit be configured to behave that
way? I have tried to simply specify no baseline repro and at least the
build succeeds and I see the project's OSGi version is constant if I
retirgger the build.
So do I can assume that this might be uncommon but working use-case or
will it break something?
> Assuming you can get or deduce the Git commit of the baseline, you can
Jenkins has a build variable for that ...
> get the list of modified files with plain Git, then you can reduce it to
> a set of folders, and pass those folders to your `mvn` command as `-pl`
> and with some extra flag to make your baseline part of the
> target-platform. As a result, only modified modules will be built.
... I think that would be a really cool feature to have such
"incremental-build" support in tycho :-)
one problem I have stumpled in the past was that the features don't get
rebuild (as there is no change from maven POV). I don't know if this is
just unsupprted or I just configured something wrong.
Am 21.04.21 um 09:06 schrieb Mickael Istria:
On Wed, Apr 21, 2021 at 8:43 AM Christoph Läubrich
<laeubi@xxxxxxxxxxxxxx <mailto:laeubi@xxxxxxxxxxxxxx>> wrote:
is something similar possible for bundles as well?
Yes, having the `jgit` timestamp provider would do this for bundles as well.
My aim is not
reproducible versions per-se, but to prevent that I get "updated"
artifacts for each build to reduce the amount of data that needs to be
downloaded for updates.
So all the additional "replace from baseline" and checks for same
content are not necessary for me.
The tricky part is about the changes (eg environment, build options...)
that can affect the build result and not appear in the Git history. A
strategy that only uses Git timestamp to build qualifier is likely to
build and distribute different artifacts with same fully qualified
version, and that is against the expectations of good versioning.
Comparing with baseline does replacement for convenience, but more
importantly, it does some comparison and verification and make build
fail if things seem inconsistent.
On the other hand if I can avoid
BUILDING the artifact if it has not changed that would be useful,
but as
I understand it is first build, then compared and if equal replaced.
Yes, for the reason mentioned above (environment can matter), it's not
really possible to fully know what changed before it's built.
But it would still be possible to build such a strategy if you are happy
enough with the restrictions/risks related to it.
I also wonder if there is any chance to get the list of CHANGED
artifacts, so if I like to update the baseline repo I only need to
upload new files?
Assuming you can get or deduce the Git commit of the baseline, you can
get the list of modified files with plain Git, then you can reduce it to
a set of folders, and pass those folders to your `mvn` command as `-pl`
and with some extra flag to make your baseline part of the
target-platform. As a result, only modified modules will be built.
--
Mickael Istria
Eclipse IDE <https://www.eclipse.org/downloads/eclipse-packages/>
developer, for Red Hat Developers <https://developers.redhat.com/>
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/tycho-user