Closed rushi closed 4 years ago
When you have parameters Jenkins expects you to POST at the build endpoint with data (your parameters). Currently we POST with no data and Jenkins rejects this with a 400.
The API exposes this - the "properties" array is nonempty for parameterized builds.
Maybe we should fetch data from Jenkins once when the page loads and set variables in the environment.
This will require a bit of work to refactor the existing code, I imagine.
Yes, that is my understanding as well. How would you 'set variables in the environment' ? Cookies?
No, just javascript
var isParameterized = false;
Kevin Burke | 415-723-4116 | www.twilio.com
On Wed, Oct 2, 2013 at 10:49 AM, Rushi Vishavadia notifications@github.comwrote:
Yes, that is my understanding as well. How would you 'set variables in the environment' ? Cookies?
— Reply to this email directly or view it on GitHubhttps://github.com/kevinburke/doony/issues/5#issuecomment-25560640 .
I'd still show the button, it would just go to the builds page instead of to the console output, or failing
Kevin Burke | 415-723-4116 | www.twilio.com
On Wed, Oct 2, 2013 at 10:56 AM, Rushi Vishavadia notifications@github.comwrote:
Only problem is then you have to wait till the JSON call is completed before deciding to show the build now button. It looks odd for a button to just appear next to the h1 after the page loads.
— Reply to this email directly or view it on GitHubhttps://github.com/kevinburke/doony/issues/5#issuecomment-25561325 .
Yep, I realized that, so deleted my post. I had confused myself with another issue when I wrote that.
On Wed, Oct 2, 2013 at 11:27 PM, Kevin Burke notifications@github.comwrote:
I'd still show the button, it would just go to the builds page instead of to the console output, or failing
Kevin Burke | 415-723-4116 | www.twilio.com
On Wed, Oct 2, 2013 at 10:56 AM, Rushi Vishavadia notifications@github.comwrote:
Only problem is then you have to wait till the JSON call is completed before deciding to show the build now button. It looks odd for a button to just appear next to the h1 after the page loads.
— Reply to this email directly or view it on GitHub< https://github.com/kevinburke/doony/issues/5#issuecomment-25561325> .
— Reply to this email directly or view it on GitHubhttps://github.com/kevinburke/doony/issues/5#issuecomment-25561438 .
I'd still show the button, it would just go to the builds page instead of to the console output, or failing.
FYI, #53 takes care of this.
If 'This build is parameterized' option is selected in the Project config, then the 'Build Now' button does not work -- it returns a 400 Bad Request.
In parametrized builds, if you kick off a build manually Jenkins takes you do a page with an input form where you can specify the build variables.