'How to run code review working flow for scripting in Jenkins Jobs?

We are running gerrit review working flow on our product development, But we have no idea to running the same working flow with script of Jenkins jobs.

Is there any way to add code review work flows for scripting in Jenkins Jobs?



Solution 1:[1]

if you want to keep your Jenkins job scripts under version control and review it you have to use pipeline job type - since that is based on a groovy script, which can be stored in the git repository. So in this way if a new patchset is created on the script gerrit can trigger the pipeline job which is based on that script.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 laplasz