-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
It will be nice to have a script/task for gerrit trigger on dynamic configuration to trigger when any change gets merge to master/any branch.
I have Jenkinsfile where I have whole CI/CD process as Jenkins-pipeline code script. I also want to include Build trigger(Gerrit evenets when change merges to master) in my jenkinsfile.
I searched for all possible ways(https://jenkins.io/doc/pipeline/steps) but I couldn't find any way to do so. Can you please provide this feature?
Got the script:
triggers {
gerrit customUrl: '', gerritProjects: [[branches: [[compareType: 'PLAIN', pattern: 'master']], compareType: 'PLAIN', disableStrictForbiddenFileVerification: false, pattern: 'gitHubRepo/repo1']], serverName: 'gerrit.com', triggerOnEvents: [changeMerged()]
}
But to make this change permanent, I have to first run it manually then from the next time when any change gets merge to master it is triggering pipeline.
That means 1st run setting up config.xml with our trigger plugin so the next runs automatically getting triggers because previous run is already setting up config.xml for it. How can I tackle this issue?