Reputation: 5178
I have a simple build release pipeline setup for a maven project:
checkout scm
sh 'mvn -B release:prepare release:perform'
The jenkins SCM polling is enabled. When release is done, an scm commit is made with the next version in the pom.xml file.
Because of the polling, the jenkins builds start again.
How do I disable this?
Upvotes: 1
Views: 89
Reputation: 27476
It would have to be done in the Jenkinsfile
using check for e.g. last commit message:
checkout scm
sh `git log --format=%s -1 > last-message`
lastMessage = readFile('last-message').trim()
if (lastMessage.startsWith('[maven-release-plugin]') {
return
}
Upvotes: 1