Hi all,
I'm about to start preparing the required setup for publishing our first release. Unfortunately there are some aspects that are much more complicated under the Eclipse umbrella. Especially:
- The GPG key used for signing releases is only available on Jenkins, and we don't have direct access to it
- We don't have our own Sonatype OSS account to push the releases to central.
This means that we MUST create a separate release job on our Jenkins instance. Previously I simply did releases using my own GPG key and my private Sonatype account.
Now the question is how we design our release job. Oracle published a recommendation which basically works like this:
- You define as special release job which is parameterized
- The job checks out the source, updates the versions, tags the release and pushes the changes to GitHub
- Then the job builds the artifacts and pushes them to the Sonatype staging area
IMO this approach as quite some downsides:
- It requires a long and non-trival shell script
- It requires us set up the repository so that Jenkins can also push tags and version updates which feels a bit dirty
To be honest, I don't like that. In our company we are using a much more lightweight approach, which basically works like this.
I update the version in the pom, tag the release and push the result manually on my workstation like this:
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=1.1.0
git commit -am "Preparing 1.1.0 release"
git tag 1.1.0
git push
Our GitLab instance is configured to start a special job for all tags which basically just runs "mvn deploy". That's all. Simple and straight forward. I would like create our Krazo job in a similar way:
- We update the version in the pom and create the tag manually.
- Then we start a release job on Jenkins which has a single parameter: The tag to release
- The job the checks out this tag and perform the release (which should be easy, as we are already doing something similar with our nightly job)
What do you think about this? Do you think this approach is acceptable?
Christian
_______________________________________________