On 3/7/22 09:22, jimsearle wrote:
>
> Thanks, appreciate the response. Sorry if my terminology is not correct
> as I am still pretty new to Gerrit. We do have many times where someone
> will do multiple commits for different reasons, then do one publish to
> regress all those distinct commits together. This generates a
> patchset-created for each changeset, and the last changeset will include
> the commits for all so we only want the regression to run for the last
> one. I understand why Gerrit does this, just looking for an elegant way
> to avoide this. I know the --amend can be used for adding to a current
> commit, but it's not always used.
That sounds like the Gerrit server definition doesn't have the following
options configured on it:
Build Current Patches Only
Abort new patch sets
Abort manual patch sets
Those three options will basically get Jenkins to do what you're expecting.
They're set by going to:
Manage Jenkins -> Gerrit Trigger -> Cog wheel of the Gerrit server
The options are just above the 'Test Connection' button of the
configuration screen.
> Currently I running a script to grab the get-related-changes via the
> REST interface, then use a when expression in the pipeline to skip the
> regressions if it's not the last commit in the chain.
> --
> 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
> <mailto:
jenkinsci-use...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/jenkinsci-users/aad98aff-a66e-406a-9769-4903a77d091en%40googlegroups.com
> <
https://groups.google.com/d/msgid/jenkinsci-users/aad98aff-a66e-406a-9769-4903a77d091en%40googlegroups.com?utm_medium=email&utm_source=footer>.