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

When building using a token, the cause parameter has no effect #57

Closed
berthamilton opened this issue Apr 17, 2018 · 4 comments
Closed

Comments

@berthamilton
Copy link

When you build using a token (i.e. JENKINS_URL/job/my_job/build?token=sometoken&cause=The+Cause) the build lists the cause as "Started by remote host 127.0.0.1 with note: The Cause"

When you trigger a build via a webhook (i.e. JENKINS_URL/generic-webhook-trigger/invoke?token=sometoken&cause=The+Cause) the cause is always "Generic Cause"

Is it possible to pass the cause parameter through so it can be shown with the build as the reason the build was triggered?

Thank you

@tomasbjerre
Copy link
Contributor

tomasbjerre commented Apr 18, 2018

Absolutely!

  1. It can be implemented as a configuration in the job. A text field where the user can enter a text, and use variables. So that the job can be configured with something like Job was triggered becasye ${username} pushed commit ${commitId}.

  2. Or, it can be implemented as using the cause parameter from the query parameters.

I think I like 1 best. And if someone wants 2, then they can just set ${cause} in the new text-field in job configuration.

@berthamilton
Copy link
Author

Thanks for replying. I'm not certain what you mean. Is there currently a way to use a text field to set this "Generic Cause" message that appears on the UI for each build?

screenshot 2018-04-18 10 37 41

Thanks

@tomasbjerre
Copy link
Contributor

tomasbjerre commented Apr 18, 2018 via email

tomasbjerre added a commit that referenced this issue Apr 18, 2018
@tomasbjerre
Copy link
Contributor

I'm releasing 1.32 now with this feature added. There is now a "cause" option in the configuration of the job.

Will be available in the update site within a few hours.

Open issue again if not working.

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

No branches or pull requests

2 participants