Publishing git tags from pipeline

151 views
Skip to first unread message

Rob Oxspring

unread,
Aug 9, 2016, 12:40:27 PM8/9/16
to Jenkins Users
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'
}

Mark Waite

unread,
Aug 9, 2016, 1:49:45 PM8/9/16
to Jenkins Users
https://issues.jenkins-ci.org/browse/JENKINS-28335 discusses the request to publish tags and commits from workflow.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d5d03313-b7f0-4a83-b8e3-5c5dc398f5fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages