Hi,
I'm using an uptodate Jenkins 2.7.2 and trying to use the new pipeline syntax to create a job that will perform a build and then create a tag in git if successful.
I was expecting to reuse the GitPublisher but that doesn't seem to be available according to the pipeline syntax helper. I assume that means that it's not a pipeline compatible build step and not that I just need to figure out undocumented syntax to make it work!
Is there a different way I should be going about this?
What changes would be required in the GitPublisher in order to become pipeline compatible?
Thanks,
Rob
node() {
deleteDir()
checkout scm
java = tool 'JDK8'
mvn = tool 'M3'
withEnv(["JAVA_HOME=${java}"]) {
opts = "--batch-mode --fail-at-end"
sh "${mvn}/bin/mvn ${opts} install"
}
// if successful
// create git tag:
// archive/publish artifacts: archive 'target/*.zip, target/*.tar.gz'
}