How to conditionally run maven-release: rollback in jenkins?

I use jenkins / hudson to create maven releases, and sometimes when assemblies do not work, I have no other way to manually roll back, and then run jenkins build again. I was wondering if there is a good and custom way to run mvn release: rollback at the end of the build, depending on the result of mvn release: prepare ? I mean, if the release process failed, I want to run maven release: rollback, otherwise not.

Thank you, your time.

+6
source share
1 answer

You can configure the Jenkins task to run a new source code check each time the task starts. Therefore, if your release fails before creating the release tag, you can fix the problems and restart the release.

+2
source

Source: https://habr.com/ru/post/920143/


All Articles