Fix the presubmitter
According to https://wiki.jenkins.io/display/JENKINS/Parameterized+Build
it should be enough to change our Get to a Post
Change-Id: I3a964e4214eee5e9979216a35a42fc1e0ddbbb78
diff --git a/jenkins/jenkins.go b/jenkins/jenkins.go
index f4d5a60..9f783e9 100644
--- a/jenkins/jenkins.go
+++ b/jenkins/jenkins.go
@@ -26,18 +26,13 @@
// RunPresubmit queues a Jenkins presubmit build.
func RunPresubmit(ref string) error {
- url := (&url.URL{
- Scheme: "http",
- Host: "localhost:8080",
- Path: "/job/gwt.presubmit/buildWithParameters",
- RawQuery: url.Values{
- "token": {creds.JenkinsAuthToken()},
- "COMMIT": {ref},
- }.Encode(),
- }).String()
+ data := url.Values{
+ "token": {creds.JenkinsAuthToken()},
+ "COMMIT": {ref},
+ }
// TODO(mdempsky): Check for failed return codes?
- resp, err := http.Get(url)
+ resp, err := http.PostForm("http://localhost:8080/job/gwt.presubmit/buildWithParameters", data)
if err == nil {
resp.Body.Close()
}