Bug 485379 - Deploy p2 repository built by bnd recipes to Nexus
Summary: Deploy p2 repository built by bnd recipes to Nexus
Status: NEW
Alias: None
Product: Orbit
Classification: Tools
Component: releng (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Project Inbox CLA
URL:
Whiteboard:
Keywords:
: 504066 (view as bug list)
Depends on:
Blocks: 490486 478337
  Show dependency tree
 
Reported: 2016-01-07 16:58 EST by Matthias Sohn CLA
Modified: 2016-10-12 15:00 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Sohn CLA 2016-01-07 16:58:06 EST
I propose we deploy the p2 repository created by the orbit-recipes Hudson job [1] to Nexus. This can be achieved by a simple configuration change in the Hudson job and gives us a canonical download URL which doesn't depend on the availability of the Orbit HIPP. Builds of other projects could then use the snapshot.unzip Nexus repository [2] to download snapshot artifacts and the releases.unzip Nexus repository [3] to download milestone and release artifacts.

If we can agree on this I can do the necessary configuration changes.

What do you think ?

[1] https://hudson.eclipse.org/orbit/job/orbit-recipes/
[2] https://repo.eclipse.org/content/unzip/snapshots.unzip/
[3] https://repo.eclipse.org/content/unzip/releases.unzip/
Comment 1 Matthias Sohn CLA 2016-01-07 16:59:48 EST
This could be also used as a base to fix bug 478337
Comment 2 David Williams CLA 2016-01-07 19:59:11 EST
(In reply to Matthias Sohn from comment #0)
> I propose we deploy the p2 repository created by the orbit-recipes Hudson
> job [1] to Nexus. This can be achieved by a simple configuration change in
> the Hudson job and gives us a canonical download URL which doesn't depend on
> the availability of the Orbit HIPP. Builds of other projects could then use
> the snapshot.unzip Nexus repository [2] to download snapshot artifacts and
> the releases.unzip Nexus repository [3] to download milestone and release
> artifacts.
> 
> If we can agree on this I can do the necessary configuration changes.
> 
> What do you think ?
> 
> [1] https://hudson.eclipse.org/orbit/job/orbit-recipes/
> [2] https://repo.eclipse.org/content/unzip/snapshots.unzip/
> [3] https://repo.eclipse.org/content/unzip/releases.unzip/

I do not think "repo.eclipse.org" is literally "Nexus", if I have my terminology correct. That is, it can not "act like" a p2 repository; only a maven repository. Did I miss something? Or am I missing your point?
Comment 3 Matthias Sohn CLA 2016-01-07 20:18:52 EST
(In reply to David Williams from comment #2)
> (In reply to Matthias Sohn from comment #0)
> > I propose we deploy the p2 repository created by the orbit-recipes Hudson
> > job [1] to Nexus. This can be achieved by a simple configuration change in
> > the Hudson job and gives us a canonical download URL which doesn't depend on
> > the availability of the Orbit HIPP. Builds of other projects could then use
> > the snapshot.unzip Nexus repository [2] to download snapshot artifacts and
> > the releases.unzip Nexus repository [3] to download milestone and release
> > artifacts.
> > 
> > If we can agree on this I can do the necessary configuration changes.
> > 
> > What do you think ?
> > 
> > [1] https://hudson.eclipse.org/orbit/job/orbit-recipes/
> > [2] https://repo.eclipse.org/content/unzip/snapshots.unzip/
> > [3] https://repo.eclipse.org/content/unzip/releases.unzip/
> 
> I do not think "repo.eclipse.org" is literally "Nexus", if I have my
> terminology correct. That is, it can not "act like" a p2 repository; only a
> maven repository. Did I miss something? Or am I missing your point?

yes, you miss the point that repo.eclipse.org has installed the Nexus unzip plugin which provides a dynamic view into p2 repository archives so that they can be used as
a p2 repository. We use this to reference the JGit p2 repository from the EGit builds
and this works like a charm. This plugin was implemented by SAP colleagues for this
purpose and we use this extensively internally at SAP. So all our internal projects
creating p2 repositories deploy them to Nexus (we use the commercial version but the plugin also works with the open source version run at repo.eclipse.org). And other projects needing bundles from a p2 repository refer to the corresponding URL in
one of the Nexus unzip repositories.

E.g. the current EGit build for 4.2.0-SNAPSHOT references the corresponding JGit 4.2.0-SNAPSHOT p2 repository in the Nexus "snapshots.unzip" repository

https://repo.eclipse.org/content/unzip/snapshots.unzip/org/eclipse/jgit/org.eclipse.jgit.repository/4.2.0-SNAPSHOT/org.eclipse.jgit.repository-4.2.0-SNAPSHOT.zip-unzip/

which provides a dynamic view to the unzipped content of the zipped p2 repository deployed by the corresponding JGit build to the Nexus "snapshots" repository

https://repo.eclipse.org/content/groups/snapshots/org/eclipse/jgit/org.eclipse.jgit.repository/4.2.0-SNAPSHOT/

EGit deploys its own p2 repository to the Nexus "snapshots" repository

https://repo.eclipse.org/content/groups/snapshots/org/eclipse/egit/org.eclipse.egit.repository/4.2.0-SNAPSHOT/

which other projects can reference via the Nexus "snapshots.unzip" repository

https://repo.eclipse.org/content/unzip/snapshots.unzip/org/eclipse/egit/org.eclipse.egit.repository/4.2.0-SNAPSHOT/org.eclipse.egit.repository-4.2.0-SNAPSHOT.zip-unzip/

Similarily released versions are deployed to the Nexus "releases" repository and can be referenced via the corresponding Nexus "releases.unzip" repository, e.g.

https://repo.eclipse.org/content/groups/releases/org/eclipse/egit/org.eclipse.egit.repository/4.1.1.201511131810-r/

https://repo.eclipse.org/content/unzip/releases.unzip/org/eclipse/egit/org.eclipse.egit.repository/4.1.1.201511131810-r/org.eclipse.egit.repository-4.1.1.201511131810-r.zip-unzip/

the former is deployed by the build and the latter is a dynamic view into the content of the zipped p2 repository provided by the Nexus unzip plugin.
Comment 4 Gunnar Wagenknecht CLA 2016-01-13 03:15:02 EST
I like the idea. But I'm afraid that this will become too much for the server. I was wondering if there is a way to just deploy a smaller subset of bundles/recipes as repos?
Comment 5 Matthias Sohn CLA 2016-01-13 05:03:48 EST
(In reply to Gunnar Wagenknecht from comment #4)
> I like the idea. But I'm afraid that this will become too much for the
> server.

on which dimension ? Do you think it will run out of disk space or something else ?

In order to prevent that the pretty large repositories created by the Orbit builds consume too much disk space purging of SNAPSHOT builds could be configured more
aggressively than for other projects [1]. 

We deploy all CI and release builds of JGit and EGit to Nexus since repo.eclipse.org
is available and didn't face any problems since it was promoted to an official
infrastructure service.

> I was wondering if there is a way to just deploy a smaller subset of
> bundles/recipes as repos?

do you mean you want to build multiple p2 repositories instead of one ?

[1] "Remove Snapshots from Repository" in https://books.sonatype.com/nexus-book/reference/scheduled-tasks.html
Comment 6 Gunnar Wagenknecht CLA 2016-01-13 07:47:28 EST
(In reply to Matthias Sohn from comment #5)
> on which dimension ? Do you think it will run out of disk space or something
> else ?

Probably just space.

> do you mean you want to build multiple p2 repositories instead of one ?

Yes. There is a wish to just build the (re-)recipes touched/changed/modified. Currently (also in the old world) everything is compiled and aggregated into the p2 repo. It's a bit of waste to build an produce hundreds of bundles if only on recipe was added (for example). But I'm not sure yet, how that would work in a Tycho world.
Comment 7 Roland Grunberg CLA 2016-01-13 15:23:18 EST
I've proposed using eclipse-jarsigner-plugin (https://git.eclipse.org/r/#/c/64275/) to sign these bundles as part of the build process. eclipse-jarsigner-plugin 1.1.3 should support anything ending in '.jar' but currently the latest version available is 1.1.2 (https://repo.eclipse.org/content/repositories/cbi-releases/org/eclipse/cbi/maven/plugins/eclipse-jarsigner-plugin/)
Comment 8 Roland Grunberg CLA 2016-10-12 15:00:34 EDT
*** Bug 504066 has been marked as a duplicate of this bug. ***