jenkinsci / jenkinsci/gerrit-trigger-plugin

[JENKINS-63734] gerrit-trigger-plugin option "Build Current Patches Only" not work in script pipeline

Open
#911 0 comments 0 reactions 0 assignees View on GitHub
component:gerrit-trigger-plugin imported-jira-issue priority:critical resolution:unresolved
Dominant language
Java
Stars
226
Forks
289
PR merge metrics
No merged PRs in 30d

Description

my script pipeline trigger config is: 

     pipelineTriggers([

gerrit(customUrl: '', gerritProjects: [[branches: [[compareType: env.GERRIT_BRANCHES_COMPARE_TYPE, pattern: env.GERRIT_BRANCHES_PATTERN]], compareType: 'PLAIN', pattern: env.GERRIT_PROJECT_PATTERN]], triggerOnEvents: [commentAddedContains(env.GERRIT_TRIGGER_COMMENT)])
])

gerrit comment can trigger jenkins job, but if you set a new patch and comment again, the old build don't abort when option "Build Current Patches Only" is checked , how can i effect "Build Current Patches Only" in jenkins script pipeline?

thanks for help !

---
Originally reported by gxglls, imported from: gerrit-trigger-plugin option "Build Current Patches Only" not work in script pipeline


  • assignee: rsandell
  • status: Open
  • priority: Critical
  • component(s): gerrit-trigger-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

my script pipeline trigger config is: 



     pipelineTriggers([

gerrit(customUrl: '', gerritProjects: [[branches: [[compareType: env.GERRIT_BRANCHES_COMPARE_TYPE, pattern: env.GERRIT_BRANCHES_PATTERN]], compareType: 'PLAIN', pattern: env.GERRIT_PROJECT_PATTERN]], triggerOnEvents: [commentAddedContains(env.GERRIT_TRIGGER_COMMENT)])
])


gerrit comment can trigger jenkins job, but if you set a new patch and comment again, the old build don't abort when option "Build Current Patches Only" is checked , how can i effect "Build Current Patches Only" in jenkins script pipeline?

thanks for help !

  • environment: Gerrit Trigger 2.30.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with the pipelineTriggers configuration shown in the issue, using Gerrit Trigger 2.30.0 and the “Build Current Patches Only” option. Verify whether a new patch and matching comment leave the earlier build running; done means the older build is aborted when the newer patch triggers the job.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.