This will only be of interest to the project’s maintainers!
Prerequisites
This process requires that you have created a file called, for example, maven-settings.xml which contains authentication credentials for pushing to the distribution repository. Example:
<?xml version="1.0"?> <settings> <servers> <server> <id>sonatype-nexus-snapshots</id> <username>user</username> <password>...</password> </server> <server> <id>sonatype-nexus-staging</id> <username>user</username> <password>...</password> </server> </servers> </settings>
It also requires that you have the GPG key that is written into the project POM, and that you know its passphrase.
Releasing Maven Artifacts
- Clone master from the repo: git clone https://github.com/OryxProject/oryx.git
- If this is a fresh checkout, optionally configure your user name and email for use with git commits, if not already set globally: git config user.name "Your Name" and git config user.email "Your Email"
- Double-check that tests pass and packaging succeeds first: mvn clean package
- If this is a new minor release, make a new branch with git branch 2.x.y and push it to all remotes
- Prepare the release. Consider skipping the (lengthy) tests in these steps with -DskipTests if they’ve been run already. To avoid answering the same question many times, the release and new development versions can be supplied on the command line: mvn -Darguments="-DskipTests" -DreleaseVersion=... -DdevelopmentVersion=... release:prepare
- Now perform the release. This will require the gpg passphrase for the GPG signing key specified in pom.xml: mvn -s maven-settings.xml -Darguments="-DskipTests -Dgpg.passphrase=..." release:perform
- Go to https://oss.sonatype.org and Close the Staging Repo, then Release it (and Drop it automatically)
Releasing Binaries
- Download https://repo1.maven.org/maven2/com/cloudera/oryx/oryx-{batch,speed,serving}/x.y.z/oryx-{batch,speed,serving]-x.y.z.jar
- Download *.sh from https://github.com/OryxProject/oryx/tree/oryx-x.y.z/deploy/bin
- Navigate to the Github release that was just created, at https://github.com/OryxProject/oryx/releases/tag/...
- Edit the title to something more meaningful like Oryx x.y.z
- Paste brief release notes into the description, including a link to resolved issues for the associated milestone, usually of the form https://github.com/OryxProject/oryx/issues?q=milestone%3A...+is%3Aclosed
- Attach the Batch, Speed, and Serving layer binaries, and scripts, and save the updated release.
Updating the Site
- Checkout the release tag if not already: git checkout -f tags/...
- mvn -DskipTests package
- mvn site
- mvn site:stage site:deploy -pl .
- echo oryx.io > docs/CNAME
- git add docs
- git stash
- git checkout master
- git stash pop
- Resolve conflicts in favor of ‘theirs’ changes
- git add docs (again?)
- git commit -m "Update site for x.y.z"
- git push origin master, and if that’s not the main remote, git push upstream master
- In a minute, check your work at http://oryx.io/