-
Notifications
You must be signed in to change notification settings - Fork 90
[RelEng] Simplify creation of release P2 repo and restore its mirrorsURL #3204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RelEng] Simplify creation of release P2 repo and restore its mirrorsURL #3204
Conversation
|
An alternative would be to just fix the old approach and use a suitable JDK (for Java-21) and maybe simplify it's setup. This would render this fix useless as the xz file is preferred by P2 for quite some time. |
| <includeAllSources>true</includeAllSources> | ||
| <repositoryName>Eclipse ${releaseVersion} repository (for ${releaseYear}-${releaseMonth})</repositoryName> | ||
| <extraArtifactRepositoryProperties> | ||
| <p2.statsURI>https://download.eclipse.org/stats</p2.statsURI> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add this p2.statsURI?
|
The less tools, the better, so if we can use plain Tycho it would be preferable... If anything is missing there we can add it. To account for different types of builds, one can have a profile that only enable the settings if a given ENV variable is set. |
It would be great if this could be simplified, but currently I didn't found a better solution to add or just alter a property in an existing P2 repository. Neither with Tycho nor with the P2 ant tasks.
The problem is that we don't have a final release build but just promote a selected I-build repository (which is basically copying it and adding that property). |
|
We already have some mojos that cope with modify a repository: https://tycho.eclipseprojects.io/doc/latest/tycho-p2-repository-plugin/plugin-info.html tycho-p2-repository:remap-artifacts-to-m2-repo for example modify an artifact repository and tycho-p2-repository:fix-artifacts-metadata modify the metadata repo (and can recompress it as well afterwards). These mojos can usually also be called as a CLI invocation so you do not need a real "build" to do so, a good example is the tycho-p2-director:director that allows to run the director application without the need to download a full eclipse. |
|
I know all of them and tried to use them for this task, but didn't find a solution.
If you think it's suitable I can look into creating a |
As mentioned before, if something is missing we should add it :-) As mojos are quite "cheap" we can have many specialized or even a more generic Also some repos are maybe a bit more complicated than needed since they date back to where we have a split between tycho-maven and tycho-osgi so usually it can be as simple as read the data (maybe even as MetadataIO/ArtifactIO) change some little bit and write back. |
fab78c6 to
383ae3a
Compare
|
Now this change is reworked to use Maven and the new Tycho Mojo (eclipse-tycho/tycho#5209) to add the Furthermore it causes difficulties with the ampersand, which is actually illegal as XML-attribute value in this form, but Tycho seems to read it without considering the correct escaping. Having just one parameter solves this riddle (actually I have verified that the previous form is treated as desired). The other noticeable change in the results is that the name of the p2-repository is now set already when it's build to |
Since 4.28 respectively 2023-06 the property 'p2.mirrorsURL' is not added to release repositories anymore, which effectively disables the use of mirrors. This happened accidentally because the JDKs installed at the Jenkins agents running the release process became insufficient then. Instead of just providing the JDK, the whole approach to add this property is reworked: - The property is added using Maven and the new tycho mojo 'tycho-p2-repository:modify-repository-properties' - The repo is copied diretly on the download-server from the source to its target location. Only the artifacts.jar/xml.xz files are downloaded to the build workspace, modified as described above and then copied back to the target location. In order to simplify the release process, the P2-repositories produced by I-builds already have their final name set. Fixes eclipse-platform#3201
383ae3a to
d196968
Compare
Since 4.28 respectively 2023-06 the property 'p2.mirrorsURL' is not added to release repositories anymore, which effectively disables the use of mirrors.
This happened accidentally because the JDKs installed at the Jenkins agents running the release process became insufficient then.
In order to simplify the release process, the P2-repositories produced by I-builds alredy have their final name set.
Fixes #3201
This is currently a draft as it has to be tested first.