TritonDataCenter / triton

Triton DataCenter: a cloud management platform with first class support for containers.
https://www.tritondatacenter.com/
Mozilla Public License 2.0
1.31k stars 182 forks source link

TOOLS-2366 launch-build should only pass parameters to jobs which allow them #262

Closed timfoster closed 4 years ago

timfoster commented 4 years ago

This isn't correct yet 👎 Doing curl -X POST with an empty payload gets rejected by Jenkins. I need to spend a bit more time on the fix.

timf@iorangi-eth0 (grr-TOOLS-2366) CRUMB=$( curl -s --user tim.foster:xxxxx 'https://jenkins.joyent.us/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)')
timf@iorangi-eth0 (grr-TOOLS-2366) curl -s -X POST -H $CRUMB https://jenkins.joyent.us/job/joyent-org/job/sdc-agents-installer/job/release-20191107/build --user tim.foster:xxxxx
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 400 Nothing is submitted</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /job/joyent-org/job/sdc-agents-installer/job/release-20191107/build. Reason:
<pre>    Nothing is submitted</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>

</body>
</html>
timf@iorangi-eth0 (grr-TOOLS-2366)
timfoster commented 4 years ago

I think this is ready for review now, but no rush - this change shouldn't be urgent until the next build, by which stage we might have converted the headnode and platform build to the new Jenkinsfile style jobs. In those cases, I think we'll still be passing parameters to the jobs because of their special status, but that's not this bug fix.