New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix duplicate job run parameters #254
Fix duplicate job run parameters #254
Conversation
A bug is reported to Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1622014 |
Triggering a job run from Jenkins UI or triggers defined in the job could cause duplicate parameters. This is caused by missing checks between the build strategy parameters with user specified ones. Using LinkedHashMap instread of ArrayList for parameters can solve this issue.
14f9ec2
to
87f83e6
Compare
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gabemontero, vfreex The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
thanks @vfreex ! |
v 1.0.26 of the sync plugin has been initiated |
Fix duplicate job run parameters
Triggering a job run from Jenkins UI or triggers defined in the job
could cause duplicate parameters. This is caused by missing checks
between the build strategy parameters and user specified parameters.
Using LinkedHashMap instread of ArrayList for parameters can
solve this issue, where the user specified parameters are able to overrides those defined in the build strategy silently.
Reproduction:
Create a BuildConfig on OpenShift with JenkinsPipelineBuildStrategy, define an environment variable
NAME
. Note there is a cron trigger that triggers this job every 3 minutes.Then start a job run with
oc start-build demo-pipeline
to let Jenkins Sync plugin create a Jenkins job.Next, start a job run from Jenkins UI, or wait for a new job run started by the cron trigger. You should see there are 2 duplicate parameters with the same name.