Skip to content
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

Job Parameters are overwritten #120

Open
pamelasarkisyan opened this issue Apr 25, 2023 · 4 comments
Open

Job Parameters are overwritten #120

pamelasarkisyan opened this issue Apr 25, 2023 · 4 comments
Labels

Comments

@pamelasarkisyan
Copy link

pamelasarkisyan commented Apr 25, 2023

Jenkins and plugins versions report

When triggering the job using issueCommentTrigger all existing parameters are getting removed and only the new ones are visible.

Lines that are probably introducing this behaviour are:

https://github.com/jenkinsci/pipeline-github-plugin/blob/2.8-141.7e985db66f30/src/main/java/org/jenkinsci/plugins/pipeline/github/trigger/GitHubEventSubscriber.java#L132-L134

Environment:
Jenkins 2.361.3
Pipeline: GitHub -> Version2.8-141.7e985db66f30

What Operating System are you using (both controller, and any agents involved in the problem)?

N/A

Reproduction steps

Create a job with any parameters.
Trigger the job via a comment.
Navigate to Parameters for the Job that started.

Expected Results

You should see the existing parameters of the Job with the default values as defined in the job. (In my case it is declarative job so those are defined in Jenkinsfile)

Actual Results

The only parameters that you will see are: GITHUB_COMMENT and GITHUB_COMMENT_AUTHOR
Existing parameters have been removed.

Anything else?

ebc7956
This commit is aiming to add environment variables (commit name is: expose comments as env variables) but it instead add parameters.

@aaronwalker
Copy link
Member

@pamelasarkisyan when you trigger the job via a comment your expectation is you'd have the default values for any custom parameters correct? Since there is no way to trigger the custom using a comment and also pass parameters to the job.

@pamelasarkisyan
Copy link
Author

@aaronwalker Yes exactly I want to start the job via comment and keep the custom parameters with their default values.

Can GITHUB_COMMENT and GITHUB_COMMENT_AUTHOR be added as environment variables instead of parameters?

@aaronwalker
Copy link
Member

@pamelasarkisyan ok let me take a look

@preetam810
Copy link

preetam810 commented Sep 16, 2024

@aaronwalker This is a major blocker for those who use parameters in their pipelines. It would be great to have this fixed please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants