-
New Feature
-
Resolution: Unresolved
-
Major
-
None
Upgrading from using only the 'gerrit-trigger-plugin' I lose the ability to determine which gerrit event triggered the job.
I need this information to decide which type of pipeline to run (build packages when changes are opened, promote packages when they successfully pass the verification and review stage):
if (env.GERRIT_EVENT_TYPE == "patchset-created") { runBuild() } else if (env.GERRIT_EVENT_TYPE == "change-merged"){ runPromote() }
At least this environmental variable is not in the list of supported env vars... If there is any other way to get this information that I might have missed then please let me know!
[update: maybe the 'change-merged' event won't work for my use case since the job is automatically closed when the change is closed. Instead I think JENKINS-60365 might better suit my needs]
[JENKINS-63695] Add ability to determine the gerrit event which triggers a job
Description |
Original:
Upgrading from using only the 'gerrit-trigger-plugin' I lose the ability to determine which gerrit event triggered the job. I need this information to decide which type of pipeline to run (build packages when changes are opened, promote packages when they successfully pass the verification and review stage): {code:java} if (env.GERRIT_EVENT_TYPE == "patchset-created") { runBuild() } else if (env.GERRIT_EVENT_TYPE == "change-merged"){ runPromote() } {code} At least this environmental variable is not in the [list of supported env vars...|https://github.com/jenkinsci/gerrit-code-review-plugin/blob/master/BUILD.md#using-environment-variables] If there is any other way to get this information that I might have missed then please let me know! |
New:
Upgrading from using only the 'gerrit-trigger-plugin' I lose the ability to determine which gerrit event triggered the job.
I need this information to decide which type of pipeline to run (build packages when changes are opened, promote packages when they successfully pass the verification and review stage): {code:java} if (env.GERRIT_EVENT_TYPE == "patchset-created") { runBuild() } else if (env.GERRIT_EVENT_TYPE == "change-merged"){ runPromote() } {code} At least this environmental variable is not in the [list of supported env vars...|https://github.com/jenkinsci/gerrit-code-review-plugin/blob/master/BUILD.md#using-environment-variables] If there is any other way to get this information that I might have missed then please let me know! [update: maybe the 'change-merged' event won't work for my use case since the job is automatically closed when the change is closed. Instead I think JENKINS-60365 might better suit my needs] |