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 "Californium/Release Process"

m (Skip local tagging during git clone in Hudson)
(How-to release Californium)
 
(9 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
Californium consists of the following components
 
Californium consists of the following components
 
# Californium (parent)
 
# Californium (parent)
# Element Connector
+
## Element Connector
# Californium (core)
+
## Scandium
# Scandium
+
## Californium core
 
# Tools
 
# Tools
 
# Actinium
 
# Actinium
Line 16: Line 16:
 
The source code for Californium's components is managed in separate GitHub repositories as follows:
 
The source code for Californium's components is managed in separate GitHub repositories as follows:
 
{| class="wikitable"
 
{| class="wikitable"
|Californium (parent)
+
!Component
|https://github.com/eclipse/californium.git
+
!Standard URI
 +
!SSH URI (to be used on HIPP)
 
|-
 
|-
|Element Connector
+
|Californium (Core + Scandium + element-connector)
|https://github.com/eclipse/californium.element-connector.git
+
|https://github.com/eclipse/californium.git
|-
+
|ssh://deploy_github_eclipse_californium/eclipse/californium.git
|Californium (core)
+
|https://github.com/eclipse/californium.core.git
+
|-
+
|Scandium
+
|https://github.com/eclipse/californium.scandium.git
+
 
|-
 
|-
 
|Tools
 
|Tools
 
|https://github.com/eclipse/californium.tools.git
 
|https://github.com/eclipse/californium.tools.git
 +
|ssh://deploy_github_eclipse_californium.tools/eclipse/californium.tools.git
 
|-
 
|-
 
|Actinium
 
|Actinium
 
|https://github.com/eclipse/californium.actinium.git
 
|https://github.com/eclipse/californium.actinium.git
 +
|ssh://deploy_github_eclipse_californium.actinium/eclipse/californium.actinium.git
 
|-
 
|-
 
|}
 
|}
Line 40: Line 38:
 
The repositories mentioned above can be built either from the command line or using a separate Hudson build job for each repository.
 
The repositories mentioned above can be built either from the command line or using a separate Hudson build job for each repository.
 
The following table contains the steps required to build and release a repository and the corresponding actions from the command line or the respective Hudson build job configuration required to make it happen.
 
The following table contains the steps required to build and release a repository and the corresponding actions from the command line or the respective Hudson build job configuration required to make it happen.
 +
 +
The ''Standard URIs'' from the table above are supposed to be used from the command line whereas the ''SSH URIs'' need to be used in build jobs on our HIPP instance in order to be able to push tags created during the build back to GitHub using deploy keys associated with the ''SSH URIs''.
 +
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 57: Line 58:
 
|-
 
|-
 
|Checkout repository
 
|Checkout repository
|<code>git clone https://github.com/eclipse/californium.git</code>
+
|Use the ''Standard URI'' from the table above to clone the repository<br/><code>git clone https://github.com/eclipse/californium.git</code>
|Fill out '''Source Code Management''' section of build configuration like this:
+
|Fill out '''Source Code Management''' section of build configuration like this (make sure to use the ''SSH URI'' from the table above):
 
# '''Url of repository''': ''ssh://deploy_github_eclipse_californium/eclipse/californium.git''
 
# '''Url of repository''': ''ssh://deploy_github_eclipse_californium/eclipse/californium.git''
 
# '''Branch specifier''': ''master''
 
# '''Branch specifier''': ''master''
Line 68: Line 69:
 
|Set release version (probably the same as the current one but without the ''-SNAPSHOT'' suffix)
 
|Set release version (probably the same as the current one but without the ''-SNAPSHOT'' suffix)
 
|
 
|
<code>
+
For ''Californium (parent)'':<br/>
mvn versions:set -DnewVersion=X.Y.Z
+
<code>mvn versions:set -DnewVersion=X.Y.Z</code>
</code>
+
 
 +
For all other components (because the artifact version is implicitly set by the parent pom):<br/>
 +
<code>mvn versions:update-parent versions:update-child-modules -DparentVersion=X.Y.Z</code>
 
|
 
|
 
# In the '''Build''' section click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
 
# In the '''Build''' section click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
# In the newly created build step set
+
# For building ''Californium (parent)'' set
 
## '''Goals''': ''versions:set''
 
## '''Goals''': ''versions:set''
 
## '''Properties''': ''newVersion=${RELEASE_VERSION}''
 
## '''Properties''': ''newVersion=${RELEASE_VERSION}''
 +
# For building all other components set
 +
## '''Goals''': ''versions:update-parent versions:update-child-modules''
 +
## '''Properties''': ''parentVersion=${RELEASE_VERSION}''
 
|-
 
|-
 
|Build & test the code
 
|Build & test the code
 
|
 
|
 
<code>
 
<code>
mvn clean install
+
mvn clean install -DsnapshotDependencyAllowed=false
 
</code>
 
</code>
 
|
 
|
Line 86: Line 92:
 
# In the newly created build step set
 
# In the newly created build step set
 
## '''Goals''': ''clean install''
 
## '''Goals''': ''clean install''
## '''Properties''': ''maven.test.failure.ignore=false'' ''snapshotDependencyAllowed=false''
+
## '''Properties''': ''maven.test.failure.ignore=false'' ''snapshotDependencyAllowed=false'' ''enableEclipseJarSigner=true''
 +
# Click the build step's '''Advanced''' button
 +
## select ''Deploy to repo.eclipse.org + OSSRH'' from the '''Global settings''' drop-down list
 
|-
 
|-
 
|Commit pom.xml containing the release version and create a corresponding tag for it
 
|Commit pom.xml containing the release version and create a corresponding tag for it
Line 110: Line 118:
 
|Publish artifacts to Eclipse release repository
 
|Publish artifacts to Eclipse release repository
 
|
 
|
<code>mvn deploy -DskipStaging=true -DenableEclipseJarSigner=true</code>
+
<code>mvn deploy -DskipStaging=true</code>
 
|
 
|
 
# Click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
 
# Click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
 
# In the newly created build step set
 
# In the newly created build step set
 
## '''Goals''': ''mvn:deploy''
 
## '''Goals''': ''mvn:deploy''
## '''Properties''': ''skipStaging=true'' ''enableEclipseJarSigner=true''
+
## '''Properties''': ''skipStaging=true''
 +
# Click the build step's '''Advanced''' button
 +
## select ''Deploy to repo.eclipse.org + OSSRH'' from the '''Global settings''' drop-down list
 
|-
 
|-
 
|Publish artifacts to Maven Central's staging repo
 
|Publish artifacts to Maven Central's staging repo
Line 125: Line 135:
 
## '''Goals''': ''mvn:deploy''
 
## '''Goals''': ''mvn:deploy''
 
## '''Properties''': ''createGPGSignature=true''
 
## '''Properties''': ''createGPGSignature=true''
 +
# Click the build step's '''Advanced''' button
 +
## select ''Deploy to repo.eclipse.org + OSSRH'' from the '''Global settings''' drop-down list
 
|-
 
|-
 
|Set next development version
 
|Set next development version
 
|
 
|
<code>
+
For building ''Californium (parent)'':
mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT
+
 
</code>
+
<code>mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT</code>
 +
 
 +
For building all other components:
 +
 
 +
<code>mvn versions:update-parent versions:update-child-modules -DparentVersion=X.Y.Z-SNAPSHOT -DallowSnapshots=true</code>
 
|
 
|
 
# Click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
 
# Click the '''Add build step''' drop-down list and select '''Invoke Maven 3'''
# In the newly created build step set
+
# For building ''Californium (parent)'' set
 
## '''Goals''': ''versions:set''
 
## '''Goals''': ''versions:set''
 
## '''Properties''': ''newVersion=${NEXT_VERSION}''
 
## '''Properties''': ''newVersion=${NEXT_VERSION}''
 +
# For building all other components set
 +
## '''Goals''': ''versions:update-parent versions:update-child-modules''
 +
## '''Properties''': ''parentVersion=${NEXT_VERSION}'' ''allowSnapshots=true''
 
|-
 
|-
 
|Push changes to SCM
 
|Push changes to SCM
Line 164: Line 183:
  
 
<code>
 
<code>
git clone git@github.com:eclipse/californium.element-connector.git
 
 
git clone git@github.com:eclipse/californium.scandium.git
 
 
 
git clone git@github.com:eclipse/californium.git
 
git clone git@github.com:eclipse/californium.git
  
Line 178: Line 193:
  
 
<code>
 
<code>
element-connector
 
 
scandium
 
 
 
californium
 
californium
  

Latest revision as of 07:51, 9 May 2016

How-to release Californium

Californium consists of the following components

  1. Californium (parent)
    1. Element Connector
    2. Scandium
    3. Californium core
  2. Tools
  3. Actinium

Some of the components have dependencies on other components. Thus, in order to successfully build all of the components they need to be built in the order given above.

Repositories

The source code for Californium's components is managed in separate GitHub repositories as follows:

Component Standard URI SSH URI (to be used on HIPP)
Californium (Core + Scandium + element-connector) https://github.com/eclipse/californium.git ssh://deploy_github_eclipse_californium/eclipse/californium.git
Tools https://github.com/eclipse/californium.tools.git ssh://deploy_github_eclipse_californium.tools/eclipse/californium.tools.git
Actinium https://github.com/eclipse/californium.actinium.git ssh://deploy_github_eclipse_californium.actinium/eclipse/californium.actinium.git

Release Process

The repositories mentioned above can be built either from the command line or using a separate Hudson build job for each repository. The following table contains the steps required to build and release a repository and the corresponding actions from the command line or the respective Hudson build job configuration required to make it happen.

The Standard URIs from the table above are supposed to be used from the command line whereas the SSH URIs need to be used in build jobs on our HIPP instance in order to be able to push tags created during the build back to GitHub using deploy keys associated with the SSH URIs.


Step Command Line Hudson Build Job Configuration
Create build job not necessary
  1. Create a new build job using the Build a free-style software job option
  2. Check the This build is parameterized checkbox and add the following parameters:
    1. RELEASE_VERSION - no Default Value
    2. NEXT_VERSION - no Default Value
  3. Under Advanced Job Options click the Advanced... button
  4. Check the Clean workspace before build checkbox
Checkout repository Use the Standard URI from the table above to clone the repository
git clone https://github.com/eclipse/californium.git
Fill out Source Code Management section of build configuration like this (make sure to use the SSH URI from the table above):
  1. Url of repository: ssh://deploy_github_eclipse_californium/eclipse/californium.git
  2. Branch specifier: master
  3. click Advanced... button in the Branches to build section to expand more options
  4. Checkout/merge to local branch: master
  5. check Skip internal tag
  6. check Use Command line git to clone
Set release version (probably the same as the current one but without the -SNAPSHOT suffix)

For Californium (parent):
mvn versions:set -DnewVersion=X.Y.Z

For all other components (because the artifact version is implicitly set by the parent pom):
mvn versions:update-parent versions:update-child-modules -DparentVersion=X.Y.Z

  1. In the Build section click the Add build step drop-down list and select Invoke Maven 3
  2. For building Californium (parent) set
    1. Goals: versions:set
    2. Properties: newVersion=${RELEASE_VERSION}
  3. For building all other components set
    1. Goals: versions:update-parent versions:update-child-modules
    2. Properties: parentVersion=${RELEASE_VERSION}
Build & test the code

mvn clean install -DsnapshotDependencyAllowed=false

  1. Click the Add build step drop-down list and select Invoke Maven 3
  2. In the newly created build step set
    1. Goals: clean install
    2. Properties: maven.test.failure.ignore=false snapshotDependencyAllowed=false enableEclipseJarSigner=true
  3. Click the build step's Advanced button
    1. select Deploy to repo.eclipse.org + OSSRH from the Global settings drop-down list
Commit pom.xml containing the release version and create a corresponding tag for it

git add pom.xml \*/pom.xml

git commit -m "Release X.Y.Z"

git tag "X.Y.Z"

  1. Click the Add build step drop-down list and select Execute shell
  2. In the newly created build step add the following script

git add pom.xml \*/pom.xml

git commit -m "Release ${RELEASE_VERSION}"

git tag ${RELEASE_VERSION}

Publish artifacts to Eclipse release repository

mvn deploy -DskipStaging=true

  1. Click the Add build step drop-down list and select Invoke Maven 3
  2. In the newly created build step set
    1. Goals: mvn:deploy
    2. Properties: skipStaging=true
  3. Click the build step's Advanced button
    1. select Deploy to repo.eclipse.org + OSSRH from the Global settings drop-down list
Publish artifacts to Maven Central's staging repo

mvn deploy

  1. Click the Add build step drop-down list and select Invoke Maven 3
  2. In the newly created build step set
    1. Goals: mvn:deploy
    2. Properties: createGPGSignature=true
  3. Click the build step's Advanced button
    1. select Deploy to repo.eclipse.org + OSSRH from the Global settings drop-down list
Set next development version

For building Californium (parent):

mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT

For building all other components:

mvn versions:update-parent versions:update-child-modules -DparentVersion=X.Y.Z-SNAPSHOT -DallowSnapshots=true

  1. Click the Add build step drop-down list and select Invoke Maven 3
  2. For building Californium (parent) set
    1. Goals: versions:set
    2. Properties: newVersion=${NEXT_VERSION}
  3. For building all other components set
    1. Goals: versions:update-parent versions:update-child-modules
    2. Properties: parentVersion=${NEXT_VERSION} allowSnapshots=true
Push changes to SCM

git add pom.xml \*/pom.xml

git commit -m "Release X.Y.Z"

git push && git push --tags

  1. Click the Add build step drop-down list and select Execute shell
  2. In the newly created build step add the following script

git add pom.xml \*/pom.xml

git commit -m "Release ${RELEASE_VERSION}"

git push ssh://deploy_github_eclipse_californium/eclipse/californium.git && git push --tags ssh://deploy_github_eclipse_californium/eclipse/californium.git

Reference Instructions

1st get a copy of all the californium repository:

git clone git@github.com:eclipse/californium.git

git clone git@github.com:eclipse/californium.tools.git

git clone git@github.com:eclipse/californium.actinium.git

You need to process the repository in the correct order:

californium

tools

actinium

In each repository:

  • set the final version (probably the same as the current one but without "SNAPSHOT")

mvn versions:set -DnewVersion=X.Y.Z

  • build & sign the artifacts (you need a gpg key; see below)

mvn clean install -Prelease

  • looks in ./target/ does the artifacts looks nice?
  • check if there is no *-SNAPSHOT in the dependency:

mvn dependency:tree

  • then commit the pom.xml, and tag the release:

git add pom.xml \*/pom.xml

git commit -m "Release X.Y.Z"

git tag "X.Y.Z"

  • publish the artifacts on maven central

mvn deploy -Prelease

  • prepare for the next cycle:

mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT

git add pom.xml \*/pom.xml

git commit -m "Release X.Y.Z"

  • push the commits

git push && git push --tags

Now connect on the Sonatype OSS Nexus and close the staging repository. If it's fine you will be able to "release" the repository and the artifact will show up in maven central in a few hours. Next step is to edit the Eclipse project metadata and announce it on the mailing list.


GPG Help

Under CygWin the following error might occur: gpg: cannot open tty `no tty': No such file or directory

This can be fixed by configuring gpg through an active profile in .m2\settings.xml where also the Sonatype password is stored:

<settings>
  <servers>
    <server>
      <id>ossrh</id>
      <username>[username]</username>
      <password>[password]</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>gpg</id>
      <properties>
        <gpg.executable>gpg</gpg.executable>
        <gpg.passphrase>[password]</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>gpg</activeProfile>
  </activeProfiles>
</settings>

Back to the top