ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] incubator-ignite git commit: # ignite-456: return to curl
Date Fri, 15 May 2015 18:30:08 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-456 07cd5613d -> 97d5c760d


# ignite-456: return to curl


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/15887e84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/15887e84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/15887e84

Branch: refs/heads/ignite-456
Commit: 15887e84767f546072381322b893e13e843a05d2
Parents: 07cd561
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Fri May 15 19:11:32 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Fri May 15 19:11:32 2015 +0300

----------------------------------------------------------------------
 dev-tools/src/main/groovy/jiraslurp.groovy | 38 ++++---------------------
 1 file changed, 6 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15887e84/dev-tools/src/main/groovy/jiraslurp.groovy
----------------------------------------------------------------------
diff --git a/dev-tools/src/main/groovy/jiraslurp.groovy b/dev-tools/src/main/groovy/jiraslurp.groovy
index 4075739..40f6d47 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -140,38 +140,12 @@ def runAllTestBuilds = { jiraNum ->
     println "Triggering $it build for JIRA_NUM=$jiraNum"
 
     def buildCommand =
-        "<build>" +
-            "<buildType id='$it'/>" +
-            "<properties>" +
-            "<property name='env.JIRA_NUM' value='$jiraNum'/>" +
-            "</properties>" +
-            "</build>";
-
-
-    String postData = URLEncoder.encode(buildCommand, "UTF-8");
-
-    URL url = new URL("http://$user:$pwd@10.30.0.229:80/httpAuth/app/rest/buildQueue");
-    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-    conn.setDoOutput(true);
-    conn.setRequestMethod("POST");
-    conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-//    conn.setRequestProperty("Content-Type", "application/xml");
-    conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
-
-    OutputStream os = conn.getOutputStream()
-    os.write(postData.getBytes())
-    os.flush()
-    os.close()
-
-    // Read response
-    StringBuilder responseSB = new StringBuilder();
-    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
-
-    String line;
-    while ( (line = br.readLine()) != null)
-      responseSB.append(line);
-
-    br.close();
+        "<build><buildType id='$it'/><properties><property name='env.JIRA_NUM'
value='$jiraNum'/></properties></build>";
+
+
+    def runTcBuild = "curl -v http://$user:$pwd@10.30.0.229:80/httpAuth/app/rest/buildQueue
-H \"Content-Type: application/xml\" -d \"${buildCommand}\""
+
+    checkprocess runTcBuild.execute()
   }
 }
 


Mime
View raw message