0

In my jenkins pipeline, I want to split gradle release tasks in two separates stages, such way like this :

  • Part 1 : gradle release : all tasks except updateVersion, commitNewVersion
  • Other processing
  • Part 2 : gradle release:updateVersion, release:commitNewVersion

In want to have something like this, in my pipeline :

stage('release') {
 sh "./gradlew release -x release:updateVersion -x release:commitNewVersion"
}
stage('process') {
 ...
}
stage('init new version') {
 sh "./gradlew release:updateVersion  release:commitNewVersion"
}

Is there a clean way to do that ?

Maro
  • 1
  • 1
  • 1
    The example you've provided looks reasonable, what do you expect and what actually happens? What do you want to change? – aSemy Dec 27 '22 at 11:27
  • I'm expecting to skip updateVersion and commitNewVersion tasks in release stage and resume them in new version stage, but while executing pipeline I have this error "Project 'release' not found in root project..". I have also tried this syntax : sh "./gradlew release -x updateVersion -x commitNewVersion" – Maro Dec 27 '22 at 13:07

0 Answers0