ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-456: 2 builds with param
Date Mon, 18 May 2015 10:09:25 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-456 8571dd470 -> 07fadeefa


# ignite-456: 2 builds with param


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

Branch: refs/heads/ignite-456
Commit: 07fadeefafa1f4cd02f34de8bf4c30bdbeed4ef4
Parents: 8571dd4
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Mon May 18 13:10:14 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Mon May 18 13:10:14 2015 +0300

----------------------------------------------------------------------
 dev-tools/src/main/groovy/jiraslurp.groovy | 53 +++++++++++++++----------
 1 file changed, 33 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/07fadeef/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 5b73b70..fb449a9 100644
--- a/dev-tools/src/main/groovy/jiraslurp.groovy
+++ b/dev-tools/src/main/groovy/jiraslurp.groovy
@@ -132,38 +132,51 @@ def JIRA_xml = { jiranum ->
 def run
 
 def runAllTestBuilds = { jiraNum ->
+  def tcURL = System.getenv('TC_URL')
   def user = System.getenv('TASK_RUNNER_USER')
   def pwd = System.getenv('TASK_RUNNER_PWD')
 
-  String postData = "<build><buildType id='Ignite_IgniteBasic'/></build>";
+  ["Ignite_IgniteBasic",
+   "Ignite_IgniteCache"].each {
+    String postData =
+        "<build>" +
+        "  <buildType id='$it'/>" +
+        "  <properties>" +
+        "    <property name='JIRA_NUM' value='$jiraNum'/>" +
+        "  </properties>" +
+        "</build>";
 
-  URL url = new URL("http://10.30.0.229:80/httpAuth/app/rest/buildQueue");
-  HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+    URL url = new URL("http://$tcURL:80/httpAuth/app/rest/buildQueue");
+      
+    HttpURLConnection conn = (HttpURLConnection) url.openConnection();
 
-  String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
+    String encoded = new sun.misc.BASE64Encoder().encode("$user:$pwd".getBytes());
 
-  conn.setRequestProperty("Authorization", "Basic "+encoded);
+    conn.setRequestProperty("Authorization", "Basic "+encoded);
 
-  conn.setDoOutput(true);
-  conn.setRequestMethod("POST");
-  conn.setRequestProperty("Content-Type", "application/xml");
-  conn.setRequestProperty("Content-Length", String.valueOf(postData.length()));
+    conn.setDoOutput(true);
+    conn.setRequestMethod("POST");
+    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();
+    OutputStream os = conn.getOutputStream();
+    os.write(postData.getBytes());
+    os.flush();
+    os.close();
 
-  conn.connect();
+    conn.connect();
 
-  // Read response.
-  BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+    // Read response.
+    println "Response: "  
+      
+    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
 
-  String line;
-  while ( (line = br.readLine()) != null)
-    println line
+    String line;
+    while ( (line = br.readLine()) != null)
+      println line
 
-  br.close();
+    br.close();
+  }
 }
 
 args.each {


Mime
View raw message