Adding a new version branch and other post-release tasks
Â
Overview
As each official CONNECT version is released, tasks must be completed to prepare CONNECT for its next cycle to ensure that the integrity of each separate, fully-tested, easily implementable CONNECT version is maintained. This is also important in case newer code contributions need to be rolled back. The following is a list of tasks that need to be completed after each release to keep each version, official or non-official, fully intact with the appropriate common types, web services, Admin GUI versions, database scripts, etc. for that particular code compilation.
Pre-Release Checklist
- Make sure all the final common libraries (web Services, common Types) are uploaded to the maven repository (Try to automate this)Â
- Create wiki/space placeholders for next release once the Release name is identified (major vs minor)
- Create a git tag for the release commit to produce a binary for testing
Post-Release Checklist
- Make sure all the new Regression Suites added are moved to their respective directories (from new to Standard or Bimodal or Manual or Pass-through)
- Make sure the released version's final branches are created (both integration and final branch).(Applicable for major and minor releases only)
- Close release version in Jira
- Creating ticket to update Readme.md and History Page to reflect the release version
Team Setup
Our team account has been set up with the following Sonatype JIRA ticket:Â https://issues.sonatype.org/browse/OSSRH-4335
The current process is to deploy and release CONNECTCommonTypes and CONNECT-Webservices. Â Full directions on deploying and releasing a binary with Sonatype can be found here.
Deploy Setup
The machine use for deploying the binaries needs the following PGP and Maven configuration changes:
PGP
Binaries that are released to Maven Central must be PGP-signed. Using the steps below as a guide, please follow the Sonatype directions for Working with PGP Signatures.
- Check if you have GPG installed in your machine. If you are a developer, most likely GIT installation will have gpg.exe. To check, type $where gpg.exe in your Git Bash. If you see any listing, proceed with Step 3 to generate keys through command line.
- Install PGP.
Note: Download link for Windows OSÂ http://gpg4win.org/download.html - Generate a default key pair (i.e., select the (default) options when available). Â You'll need to supply some user information and a password (to be used later).
- e.g., gpg2 --gen-key
- List the signatures.
- e.g.: gpg2 --list-keys
- Publish the signatures from the list (both the pub and sub signatures).
- e.g.: gpg2 --keyserver hkp://pgp.mit.edu --send-keys <pub-key>
- e.g.: gpg2 --keyserver hkp://pgp.mit.edu --send-keys <sub-key>
Maven Settings
Create or edit the settings.xml maven file. For local configuration (per user), the file should be at ${user.home}\.m2 (e.g., C:\\Users\johndoe\.m2). For global configuration, the file should be at ${maven.root}/conf (e.g., /opt/apache-maven-3.2.5/conf).
The settings file must contain CONNECT's authentication information for the Sonatype repositories, as shown in the following example (Note: if you get an unauthorized error, try with id "ossrh"):
Note: CONNECT Team username/password will be provided by Team members.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>${user.home}/.m2/repository</localRepository> <servers> <server> <id>sonatype-nexus-staging</id> <username>connect-sonatype-id</username> <password>connect-sonatype-pwd</password> </server> Â <server> <id>ossrh</id> <username>connect-sonatype-id</username> <password>connect-sonatype-pwd</password> </server> </servers> </settings>
Building and Preparing
The following will need to be done for both the CommonTypes and CONNECT-Webservices projects (both can be pulled down from the CONNECT GitHub repository). Â Repeat all steps for each project, step 3 in both sections below clarifies the different commands for each project. Â CommonTypes must be done first.
The steps should be performed with both git and maven available on the system path.
Note: <version to release> and <tag name> are the non-snapshot version (e.g., 4.1.1); <next development version> is the next snapshot version (e.g., 4.1.2-SNAPSHOT).
CommonTypes
- Run the following Maven commands from the project root, supplying your PGP password when prompted:
- mvn release:clean
- mvn release:prepare -DreleaseVersion=<version to release> -Dtag=<tag name> -DdevelopmentVersion=<next development version>
- Push to the git repository using your Github credentials (the version changes have already been committed by previous step).
- git push origin
- git push origin --tags
- Maven deploy to Sonatype repository:
- mvn release:perform -DworkingDirectory=<versionToRelease> -DconnectionUrl=scm:git:https://github.com/CONNECT-Solution/Common-Types.git
Webservices
- In the Webservices POM, update the CommonTypes version to reflect the newly-released version. Stage and commit this change.
- Repeat steps 1 & 2 from the CommonTypes instructions above, using the CONNECT-Webservices repo and versions.
- Maven deploy to Sonatype repository:
- mvn release:perform -DworkingDirectory=<versionToRelease> -DconnectionUrl=scm:git:https://github.com/CONNECT-Solution/CONNECT-Webservices.gitÂ
Pushing to Maven Central
The last step is to release the binaries at Sonatype. Â First log in here. Â Follow the Sonatype deploy guidelines.
Basically, you'll need to select the staging repositories after logging in. Â Select the connectopensource repository, and choose close from the top. Â Takes about a minute, refresh to see it update. Â Once close is complete, select release (leave drop after release option marked).