waiting for https://issues.jenkins-ci.org/browse/JENKINS-26010
Simple work around:
1. Create free style project
2. connect to gerrit "As usual"
3. add groovy system script execution build step
4. trigger workflow from here (one or many)
5. wait for result
6. reply to gerrit with result
How to trigger a job from groovy? One of the possibilities
import hudson.model.*
def job = Hudson.instance.getJob("Job Name")
def mybuild = job.scheduleBuild2(0)
def myresult = mybuild.get()
print myresult.result
Additionally parameters should be passed into the triggered workflow to get
information about gerrit patchset
def params = [new
hudson.model.StringParameterValue("GERRIT_PATCHSET_REVISION",
$GERRIT_PATCHSET_REVISION)]
def myaction = new hudson.model.ParametersAction(params)
def mybuild = job.scheduleBuild2(0, myaction)
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/bfff7c86-a3e7-4375-ace0-386ebfecb1f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.