Automate release process #58
Comments
It looks like the nexus steps can be automated using https://github.com/Codearte/gradle-nexus-staging-plugin while the release steps can be automated using https://github.com/researchgate/gradle-release We would need to get another username/password for the travis user to be able to publish to nexus |
The tag is really missing here. W could also use something similar what OT uses.
I guess this can be modified manually before pushing release tag. |
@pavolloffay how do you guys do releases of Java components in hawkular? |
Directly to jboss nexus. It's also rather a manual approach. |
There are some plugins which could be used https://github.com/researchgate/gradle-release |
There's also https://github.com/ajoberstar/gradle-git/wiki/Release%20Plugins |
That's false. We have Jenkins jobs that does most of the tasks for us, including the creation of GitHub releases (with the compiled artifacts). |
Currently blocked by: https://issues.sonatype.org/browse/OSSRH-32483 |
@jpkrohling google doesn't find OSSRH-32483, do you have a link? |
I just submitted #201 , which implements the "push a tag" approach. In fact, most of the work had been done already, I just needed to set the version to set the version to be the tag and add the appropriate Gradle properties. What I have also planned is to add the closing/releasing of the Nexus repository, but I'd do that after a couple of releases to mature the process implemented by the linked PR, to make sure we don't release a broken repository. What I have not done, and I'm not sure we should do it there, is to bump the version. The main problem is that the automatic release procedure can't tell if the release is a micro, minor or major change. So, we'd still require version changes to happen manually on master. |
For bumping the version we could do this. Regarding auto-version bump we could always bump the patch version. The pattern is following: major version bump:
minor version bump:
it basically always releases the tag you pushed and bumps patch-snapshot based on that version. |
What about:
|
Note that the version used for the actual release comes from the tag ( In the end, the person creating the tag is setting the version. |
The current release process requires interacting with sonatype UI which is annoying and people can forget to do it. @jpkrohling do you know how we could solve it? I think we have something similar in hawkular org. When I was releasing datamining I remember using |
Right, it's possible to automate the closing/releasing of the staging repository. I think we kept it manual for now in order to be able to check the staging repo before actually releasing, but I think we can now automate it. |
I am +1 for automating it as much as possible. We have also talked about it on gitter channel. |
The current release process does not create any commits. By looking at git logs It's hard to see when release happened. Release readme is not accurate it says that staging repository should be closed manually. |
For maven releases, the commits are usually created due to automatic update of the version. However for gradle I think we need to update the development version manually? If this could be automated in some way it would have the same result. |
There are gradle plugins which do the same as maven does. |
@yurishkuro @vprithvi do you agree on adding release commits when performing the release? The commits would be automatically added by gradle plugin e.g. https://github.com/researchgate/gradle-release |
@pavolloffay I agree, but I would prefer much more automation, including automatically bumping the patch version number, updating the change log, etc. It seems that a plugin like https://github.com/mockito/shipkit could work well. |
I like the release commits, they make it clear in the history when release happens. It's what we do in other repos too. |
Current state: the release process is still problematic. Right now, we end up doing the upload process manually, due to a bug somewhere between the Gradle plugin, Travis and Nexus. |
I'm removing myself as the assignee, as I think @pavolloffay has worked on this lately. |
There have been some changes to the release bits we are using. Now the fully automated release from travis works well, it closes staging repositories automatically. To do the release we just have to push a tag. The release version is taken from the tag so no need to update it manually, however after the release it stays with the same value as before the release. We could change it to something version agnostic eg. This way we still have snapshots - however always |
Current release process is documented in the readme and is fairly painful. The most ideal process would be to push a tag and have the release happen automatically (but I am not clear what happens to the changelog in this case). Using a make command would also be acceptable if it can do a bunch of changes in a row like bump the version, publish, bump version to snapshot again, and then automatically close & release the repo from staging to maven via sonatype.
The text was updated successfully, but these errors were encountered: