Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PackageDrone/ReleaseBuild"

 
(12 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
* Maven 3.3.x with <code>mvn</code> in the "PATH"
 
* Maven 3.3.x with <code>mvn</code> in the "PATH"
 +
* Ant 1.9.x with <code>ant</code> in the "PATH"
 
* <code>gpg-agent</code> and a working signing key
 
* <code>gpg-agent</code> and a working signing key
 
* rpm build tools installed
 
* rpm build tools installed
Line 28: Line 29:
 
  mvn clean install  
 
  mvn clean install  
 
  cd ..
 
  cd ..
  mvn clean verify -Prpm -Pjdeb-sign  -Dtycho.localArtifacts=ignore
+
  mvn clean verify -Prpm -Pjdeb-sign
 +
 
 +
=== Increment the version ===
 +
 
 +
Change the version in the main pom. Then update the children:
 +
 
 +
  mvn -N versions:update-child-modules -DallowSnapshots=true
 +
mvn versions:commit
 +
 
 +
Also change:
 +
 
 +
features/org.eclipse.packagedrone.product.server.feature/feature.xml
 +
bundles/org.eclipse.packagedrone/META-INF/MANIFEST.MF
 +
testing/server-test/pom.xml
 +
runtime/pom.xml
 +
products/org.eclipse.packagedrone.server/server.product
 +
products/org.eclipse.packagedrone.server/pom.xml
 +
 
 +
Secondaries:
 +
 
 +
Change the version in <code>secondary/pom.xml</code>, then do:
 +
 
 +
* mvn -f secondary/pom.xml -N versions:update-child-modules -DallowSnapshots=true
 +
* mvn -f secondary/pom.xml versions:commit
 +
 
 +
Then:
 +
 
 +
git ls-files  --modified | xargs git add
 +
git commit
  
 
=== Build profiles ===
 
=== Build profiles ===
  
 
The <code>jdeb-sign</code> profile uses the <code>jdeb.*</code> properties above to sign the DEB and RPM packages. This profiles also requires the <code>rpm</code> profile to be active.
 
The <code>jdeb-sign</code> profile uses the <code>jdeb.*</code> properties above to sign the DEB and RPM packages. This profiles also requires the <code>rpm</code> profile to be active.
 +
 +
=== Running the integration test ===
 +
 +
cd testing/server-test
 +
mvn test
  
 
== Assembling outputs ==
 
== Assembling outputs ==
Line 54: Line 88:
  
 
  ant -DdryRun= -DkeyId=320E6224 -Declipse.committer=userid -DbaseVersion=0.1 -Drelease=0.m1 -DbuildType=milestone -f build.ant publish
 
  ant -DdryRun= -DkeyId=320E6224 -Declipse.committer=userid -DbaseVersion=0.1 -Drelease=0.m1 -DbuildType=milestone -f build.ant publish
 +
 +
Using an alternate rync mirror to speed up populating the local download:
 +
 +
ant … -Drsync.mirror=rsync://ftp-stud.hs-esslingen.de/eclipse/package-drone/
 +
 +
=== Update current "link" ===
 +
 +
Unfortunately we cannot use symbolic links on the Eclipse download area. So we actually have to copy things.
 +
 +
With every final release the <code>build.ant</code> has to be modified to point to the correct, new release folder. Locate the file <code>promote/build.ant</code> and the ant target "build.link" and fix it.
 +
 +
=== Download area ===
  
 
The download location is structured like this:
 
The download location is structured like this:
Line 109: Line 155:
 
</pre>
 
</pre>
 
 
 +
 +
== Testing ==
 +
 +
It is possible to test the actual downloadable artifacts. In the <code>test</code> directory of the <code>deploy</code> project are a few sub directories which host docker files, which test the installation from official Eclipse download servers.
 +
 +
e.g.
 +
<pre>
 +
cd test/ubuntu
 +
docker build .
 +
</pre>
 +
 +
== Secondary components ==
 +
 +
Some components of Package Drone may be useful to other projects as well. e.g. the plain Java RPM library. For this we do have a secondary build, which does perform a non-Tycho build, publishing to Maven Central.
 +
 +
The release process currently is far from optimal:
 +
* change the version of each <code>secondary.pom</code>
 +
* push the changes
 +
* run the hudson job https://hudson.eclipse.org/package-drone/job/package-drone-secondary-build/ right after pushing the version change
 +
* change the versions of the <code>secondary.pom</code>s to the next development version

Latest revision as of 05:23, 16 November 2017

This page tries to describe the internal build process for releases.

Prerequisites

  • Maven 3.3.x with mvn in the "PATH"
  • Ant 1.9.x with ant in the "PATH"
  • gpg-agent and a working signing key
  • rpm build tools installed

You will need to replace 320E6224 with your signing key in the following examples.

Have the following properties set in your ~/.m2/settings.xml or provide these during the builds:

<jdeb.keyring>/path/to/gpg/keyring</jdeb.keyring>
<jdeb.key>320E6224</jdeb.key>
<jdeb.passphrase>passphrase</jdeb.passphrase>

Have the following RPM macros defined in your ~/.rpmmacros:

%_gpg_name 320E6224
%__gpg_check_password_cmd /bin/true
%__gpg_sign_cmd %{__gpg} gpg --batch --no-verbose --no-armor --use-agent --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}

Performing the build

git clone https://github.com/eclipse/packagedrone.git packagedrone.git
cd packagedrone.git
cd runtime
mvn clean install 
cd ..
mvn clean verify -Prpm -Pjdeb-sign

Increment the version

Change the version in the main pom. Then update the children:

mvn -N versions:update-child-modules -DallowSnapshots=true
mvn versions:commit

Also change:

features/org.eclipse.packagedrone.product.server.feature/feature.xml
bundles/org.eclipse.packagedrone/META-INF/MANIFEST.MF
testing/server-test/pom.xml
runtime/pom.xml
products/org.eclipse.packagedrone.server/server.product
products/org.eclipse.packagedrone.server/pom.xml

Secondaries:

Change the version in secondary/pom.xml, then do:

* mvn -f secondary/pom.xml -N versions:update-child-modules -DallowSnapshots=true
* mvn -f secondary/pom.xml versions:commit

Then:

git ls-files  --modified | xargs git add
git commit

Build profiles

The jdeb-sign profile uses the jdeb.* properties above to sign the DEB and RPM packages. This profiles also requires the rpm profile to be active.

Running the integration test

cd testing/server-test
mvn test

Assembling outputs

This step will download the current content of the download area, merge in the newly built content, create the repositories and upload the result back to the download area.

Run the following commands after a successful local build:

cd deploy/promote
ant -DkeyId=320E6224 -Declipse.committer=userid -DbaseVersion=0.1 -Drelease=0.m1 -DbuildType=milestone -f build.ant

Check the output with:

find output

Dry run the upload:

ant -DkeyId=320E6224 -Declipse.committer=userid -DbaseVersion=0.1 -Drelease=0.m1 -DbuildType=milestone -f build.ant publish

Perform the upload:

ant -DdryRun= -DkeyId=320E6224 -Declipse.committer=userid -DbaseVersion=0.1 -Drelease=0.m1 -DbuildType=milestone -f build.ant publish

Using an alternate rync mirror to speed up populating the local download:

ant … -Drsync.mirror=rsync://ftp-stud.hs-esslingen.de/eclipse/package-drone/

Update current "link"

Unfortunately we cannot use symbolic links on the Eclipse download area. So we actually have to copy things.

With every final release the build.ant has to be modified to point to the correct, new release folder. Locate the file promote/build.ant and the ant target "build.link" and fix it.

Download area

The download location is structured like this:

# plain downloads

/package-drone/drops
                     /milestone
                              /0.12.0.m1
                              /0.12.0.m2
                              /0.12.0.m3
                              /0.12.1.m1
                              /0.13.0.m1
                              /0.13.0.m2
                              /0.13.1.m1

                     /release
                              /0.12.0
                              /0.12.1
                              /0.12.2
                              /0.13.0
                              /0.13.1

# repositories (apt, yum)

/package-drone/release
                        /current -> 0.13

                        /0.12
                                 /ubuntu
                                 /rhel6
                                 /rhel7
                                 /opensuse13
                        /0.13
                                 /ubuntu
                                 /rhel6
                                 /rhel7
                                 /opensuse13

/package-drone/milestone
                        /current -> 0.13

                        /0.12
                                 /ubuntu
                                 /rhel6
                                 /rhel7
                                 /opensuse13

                        /0.13
                                 /ubuntu
                                 /rhel6
                                 /rhel7
                                 /opensuse13

Testing

It is possible to test the actual downloadable artifacts. In the test directory of the deploy project are a few sub directories which host docker files, which test the installation from official Eclipse download servers.

e.g.

cd test/ubuntu
docker build .

Secondary components

Some components of Package Drone may be useful to other projects as well. e.g. the plain Java RPM library. For this we do have a secondary build, which does perform a non-Tycho build, publishing to Maven Central.

The release process currently is far from optimal:

Back to the top