Merge "Add 'builder-sandbox' job to Releng"
authorAric Gardner <agardner@linuxfoundation.org>
Thu, 21 Jul 2016 17:43:07 +0000 (17:43 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Thu, 21 Jul 2016 17:43:07 +0000 (17:43 +0000)
jjb/apex/apex.yml
jjb/compass4nfv/compass-ci-jobs.yml
jjb/compass4nfv/compass-deploy.sh
jjb/compass4nfv/compass-project-jobs.yml
jjb/joid/joid-deploy.sh
utils/gpg_import_key.sh
utils/push-test-logs.sh
utils/test/declaration/addtestcase.php [new file with mode: 0644]
utils/test/declaration/index.php [new file with mode: 0644]
utils/test/declaration/testcases.php [new file with mode: 0644]

index 8f9f49e..7566e25 100644 (file)
@@ -4,6 +4,7 @@
         - 'apex-verify-{stream1}'
         - 'apex-verify-{stream2}'
         - 'apex-runner-{platform}-{scenario}-{stream}'
+        - 'apex-runner-cperf-{stream1}'
         - 'apex-build-{stream}'
         - 'apex-deploy-virtual-{scenario}-{stream}'
         - 'apex-deploy-baremetal-{scenario}-{stream}'
index 6bfc737..500984a 100644 (file)
         - 'os-onos-sfc-ha':
             disabled: false
             auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+        - 'os-odl_l2-moon-noha':
+            disabled: false
+            auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
+        - 'os-nosdn-kvm-ha':
+            disabled: false
+            auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger'
 
     jobs:
         - 'compass-{scenario}-{pod}-daily-{stream}'
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-huawei-pod2-master-trigger'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: '0 23 * * *'
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-huawei-pod2-master-trigger'
     triggers:
-        - timed: ''
+        - timed: '0 19 * * *'
 - trigger:
     name: 'compass-os-onos-nofeature-ha-huawei-pod2-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-ocl-nofeature-ha-huawei-pod2-master-trigger'
     triggers:
-        - timed: ''
+        - timed: '0 11 * * *'
 - trigger:
     name: 'compass-os-onos-sfc-ha-huawei-pod2-master-trigger'
+    triggers:
+        - timed: '0 7 * * *'
+- trigger:
+    name: 'compass-os-odl_l2-moon-noha-huawei-pod2-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-kvm-ha-huawei-pod2-master-trigger'
     triggers:
         - timed: ''
 
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: '0 23 * * *'
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger'
     triggers:
-        - timed: ''
+        - timed: '0 19 * * *'
 - trigger:
     name: 'compass-os-onos-nofeature-ha-baremetal-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-ocl-nofeature-ha-baremetal-master-trigger'
     triggers:
-        - timed: '0 9 * * *'
+        - timed: '0 11 * * *'
 - trigger:
     name: 'compass-os-onos-sfc-ha-baremetal-master-trigger'
+    triggers:
+        - timed: '0 7 * * *'
+- trigger:
+    name: 'compass-os-odl_l2-moon-noha-baremetal-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-kvm-ha-baremetal-master-trigger'
     triggers:
         - timed: ''
 
     name: 'compass-os-onos-sfc-ha-baremetal-brahmaputra-trigger'
     triggers:
         - timed: ''
+- trigger:
+    name: 'compass-os-odl_l2-moon-noha-baremetal-brahmaputra-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-kvm-ha-baremetal-brahmaputra-trigger'
+    triggers:
+        - timed: ''
 
 - trigger:
     name: 'compass-os-nosdn-nofeature-ha-virtual-master-trigger'
 - trigger:
     name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: '0 23 * * *'
 - trigger:
     name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: ''
+        - timed: '0 19 * * *'
 - trigger:
     name: 'compass-os-onos-nofeature-ha-virtual-master-trigger'
     triggers:
 - trigger:
     name: 'compass-os-ocl-nofeature-ha-virtual-master-trigger'
     triggers:
-        - timed: '0 9 * * *'
+        - timed: '0 11 * * *'
 - trigger:
     name: 'compass-os-onos-sfc-ha-virtual-master-trigger'
+    triggers:
+        - timed: '0 7 * * *'
+- trigger:
+    name: 'compass-os-odl_l2-moon-noha-virtual-master-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger'
     triggers:
         - timed: ''
 
     name: 'compass-os-onos-sfc-ha-virtual-brahmaputra-trigger'
     triggers:
         - timed: ''
+- trigger:
+    name: 'compass-os-odl_l2-moon-noha-virtual-brahmaputra-trigger'
+    triggers:
+        - timed: ''
+- trigger:
+    name: 'compass-os-nosdn-kvm-ha-virtual-brahmaputra-trigger'
+    triggers:
+        - timed: ''
index 0231ea5..c70a4ec 100644 (file)
@@ -48,6 +48,7 @@ export OS_VERSION=${COMPASS_OS_VERSION}
 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
 if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then
     export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${COMPASS_OS_VERSION_OPTION}
+    export OS_VERSION=${COMPASS_OS_VERSION_OPTION}
 fi
 ./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF}
 if [ $? -ne 0 ]; then
index 6e10e2f..e92c765 100644 (file)
             branch: '{branch}'
 
     triggers:
-        - timed: 'H 14 * * *'
+        - timed: 'H 8 * * *'
 
     builders:
         - shell:
index 6d9e8ae..4b8e3ff 100644 (file)
@@ -135,6 +135,11 @@ echo "------ Set ceph disks ------"
 sed -i -- "s@osd-devices: /srv@osd-devices: $CEPH_DISKS@" $SRCBUNDLE
 sed -i -r -- "s/^(\s+osd-reformat: )'no'/\1'$CEPH_REFORMAT'/" $SRCBUNDLE
 
+# temporary sfc feature is availble only on onos and trusty
+if [ "$NFV_FEATURES" == 'sfc' ] && [ "$SDN_CONTROLLER" == 'onos' ];then
+    UBUNTU_DISTRO=trusty
+fi
+
 ##
 ## Configure Joid deployment
 ##
@@ -182,7 +187,7 @@ export OS_USERNAME=admin
 export OS_PASSWORD=$OS_ADMIN_PASSWORD
 export OS_TENANT_NAME=admin
 export OS_AUTH_URL=http://$KEYSTONE:35357/v2.0
-export OS_REGION_NAME=Canonical
+export OS_REGION_NAME=RegionOne
 export OS_ENDPOINT_TYPE='adminURL'
 export CINDER_ENDPOINT_TYPE='adminURL'
 export GLANCE_ENDPOINT_TYPE='adminURL'
index bb11f0d..f45e409 100755 (executable)
@@ -37,12 +37,12 @@ fi
 
 if ! isinstalled gnupg2; then
   echo "error with install"
-  exit 1
+  exit 0
 fi
 
 if ! which gsutil;
   then echo "error gsutil not installed";
-  exit 1
+  exit 0
 fi
 
 if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
@@ -50,7 +50,7 @@ if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
 else
   if [ -z "$NODE_NAME" ];
     then echo "Cannot find node name"
-      exit 1
+      exit 0
     else echo "Importing key for '$NODE_NAME'";
      gsutil cp gs://opnfv-signing-keys/"$NODE_NAME"-subkey .
      gpg2 --import "$NODE_NAME"-subkey
index 964b419..b385fa8 100644 (file)
@@ -23,7 +23,9 @@ dir_result="${HOME}/opnfv/$project/results/${branch}"
 node_list=(\
 'lf-pod1' 'lf-pod2' 'intel-pod2' 'intel-pod3' \
 'intel-pod5' 'intel-pod6' 'intel-pod7' 'intel-pod8' \
-'ericsson-pod2' 'huawei-pod1' 'huawei-pod2' 'huawei-virtual1' 'huawei-virtual2' 'huawei-virtual3' 'huawei-virtual4')
+'ericsson-pod2' \
+'huawei-pod1' 'huawei-pod2' 'huawei-virtual1' 'huawei-virtual2' 'huawei-virtual3' 'huawei-virtual4')
+
 
 if [[ ! " ${node_list[@]} " =~ " ${testbed} " ]]; then
     echo "This is not a CI POD. Aborting pushing the logs to artifacts."
diff --git a/utils/test/declaration/addtestcase.php b/utils/test/declaration/addtestcase.php
new file mode 100644 (file)
index 0000000..0e5bed6
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+function sendPostData($url, $post){
+  $ch = curl_init($url);
+  $headers= array('Accept: application/json','Content-Type: application/json');
+  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
+  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+  curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
+  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
+  $result = curl_exec($ch);
+  curl_close($ch);
+  return $result;
+}
+
+if(isset($_REQUEST['url'])){
+   $url=$_REQUEST['url'];
+}
+if(isset($_REQUEST['name'])){
+   $name=$_REQUEST['name'];
+}
+if(isset($_REQUEST['desc'])){
+   $desc=$_REQUEST['desc'];
+}
+if(isset($_REQUEST['project'])){
+
+   $url_send=$_REQUEST['project'];
+   $url_send="http://testresults.opnfv.org:80/test/api/v1/projects/".$url_send."/cases";
+   $str_data=array('url'=>$url,'name'=>$name,'description'=>$desc);
+   $str_data=json_encode($str_data);
+   $res=sendPostData($url_send, $str_data);
+   echo '<div class="alert alert-success"> <strong>Success!</strong> Added New test Case  </div>';
+
+}else{
+
+   echo '<div class="alert alert-danger"> <strong>Error!</strong> Failed to Add New test Case  </div>';
+
+}
+
+?>
+
diff --git a/utils/test/declaration/index.php b/utils/test/declaration/index.php
new file mode 100644 (file)
index 0000000..b2c5d03
--- /dev/null
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <title>OPNFV DashBoard</title>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1">
+  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
+  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
+  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
+<script>
+$(function() {
+
+  $('form#new_testcase').on('submit', function(){
+    var selected = $('select#sel_pro2').find("option:selected").val();
+    var uri = $('input#uri').val();
+    var name = $('input#name').val();
+    var desc = $('textarea#desc').val();
+    var new_url="http://testresults.opnfv.org:80/test/api/v1/projects/"+selected+"/cases";
+    $.post("addtestcase.php", {"project":selected,"url":uri,"name":name,"description":desc}, function(result){
+        $("div#result").html(result);
+    });
+  });
+
+});
+
+$(function() {
+
+  $('select#sel1').on('change', function(){
+    var selected = $(this).find("option:selected").val();
+    var new_url="http://testresults.opnfv.org:80/test/api/v1/projects/"+selected+"/cases";
+    //$.post('testcases.php', {project: selected});
+    console.log(selected);
+    $.post("testcases.php", {project: selected}, function(result){
+        $("div#4a").html(result);
+    });
+
+  });
+
+});
+</script>
+<style>
+body {
+  padding : 10px ;
+}
+
+#exTab1 .tab-content {
+  color : black;
+  padding : 5px 15px;
+}
+
+#exTab2 h3 {
+  color : white;
+  background-color: #428bca;
+  padding : 5px 15px;
+}
+
+/* remove border radius for the tab */
+
+#exTab1 .nav-pills > li > a {
+  border-radius: 0;
+}
+
+/* change border radius for the tab , apply corners on top*/
+
+#exTab3 .nav-pills > li > a {
+  border-radius: 4px 4px 0 0 ;
+}
+
+#exTab3 .tab-content {
+  color : white;
+  background-color: #428bca;
+  padding : 5px 15px;
+}
+
+</style>
+</head>
+<body>
+
+<div class="container">
+  <h1>OPNFV DASHBOARD: </h1></div>
+<div id="exTab1" class="container">
+  <ul class="nav nav-pills">
+    <li class="active">
+      <a href="#1a" data-toggle="tab">PODS</a>
+    </li>
+    <li><a href="#2a" data-toggle="tab">PROJECTS</a>
+    </li>
+    <li><a href="#3a" data-toggle="tab">TESTCASES</a>
+    </li>
+    <li><a href="#5a" data-toggle="tab">ADD TESTCASE</a>
+    </li>
+    <li><a href="http://testresults.opnfv.org/kibana_dashboards/" >RESULTS</a>
+    </li>
+  </ul>
+  <div class="tab-content clearfix">
+    <div class="tab-pane active" id="1a">
+       <table class="table table-striped">
+       <thead>
+    <tr>
+      <th>#</th>
+      <th>Pod Name</th>
+      <th>Creation Date</th>
+      <th>Role</th>
+      <th>Mode</th>
+    </tr>
+  </thead>
+       <?php
+       $url = "http://testresults.opnfv.org:80/test/api/v1/pods";
+        $response = file_get_contents($url);
+       $data = json_decode($response);
+       $pods = $data->pods;
+       $i=1;
+       foreach ( $pods as $pod ){
+
+               $column_str="";
+               $column_str="<tr><td>".$i."</td>";
+               $column_str=$column_str."<td>".$pod->name."</td>";
+               $column_str= $column_str."<td>".$pod->creation_date."</td>";
+               $column_str= $column_str."<td>".$pod->role."</td>";
+               $column_str= $column_str."<td>".$pod->mode."</td>";
+               $column_str= $column_str."</tr>";
+               echo $column_str;
+               $i=$i+1;
+       }
+       ?>
+       </table>
+    </div>
+    <div class="tab-pane" id="2a">
+ <table class="table table-striped">
+        <thead>
+    <tr>
+      <th>#</th>
+      <th>Project</th>
+      <th>Creation Date</th>
+    </tr>
+  </thead>
+ <?php
+        $url = "http://testresults.opnfv.org:80/test/api/v1/projects";
+        $response = file_get_contents($url);
+        $data = json_decode($response);
+       $projects=$data->projects;
+       $i=0;
+       foreach ( $projects as $project ){
+
+                $column_str="";
+                $column_str="<tr><td>".$i."</td>";
+                $column_str=$column_str."<td>".$project->name."</td>";
+                $column_str= $column_str."<td>".$project->creation_date."</td>";
+                $column_str= $column_str."</tr>";
+                echo $column_str;
+                $i=$i+1;
+        }
+?>
+       </table>
+    </div>
+    <div class="tab-pane" id="3a">
+<div class="form-group">
+  <label for="sel1">Select list:</label>
+  <select class="form-control" id="sel1">
+<?php
+       $url = "http://testresults.opnfv.org:80/test/api/v1/projects";
+        $response = file_get_contents($url);
+        $data = json_decode($response);
+        $projects=$data->projects;
+        $i=0;
+       $firstvalue=$projects[0]->name;
+        foreach ( $projects as $project ){
+                $column_str="";
+                $column_str="<option>".$project->name."</option>";
+                echo $column_str;
+        }
+
+?>
+</select>
+</div>
+    <div class="tab-pane" id="4a">
+       <?php
+               require "testcases.php";
+       ?>
+    </div>
+    </div>
+    <div class="tab-pane" id="5a">
+       <form role="form" id="new_testcase">
+<div class="form-group">
+  <label for="sel1">Select list:</label>
+  <select class="form-control" id="sel_pro2">
+<?php
+        $url = "http://testresults.opnfv.org:80/test/api/v1/projects";
+        $response = file_get_contents($url);
+        $data = json_decode($response);
+        $projects=$data->projects;
+        $i=0;
+        $firstvalue=$projects[0]->name;
+        foreach ( $projects as $project ){
+                $column_str="";
+                $column_str="<option>".$project->name."</option>";
+                echo $column_str;
+        }
+?>
+</select>
+</div>
+<div class="form-group"> <!-- Name field -->
+               <label class="control-label " for="name">TestCase URI</label>
+               <input class="form-control" id="uri" name="uri" type="text"/>
+       </div>
+<div class="form-group"> <!-- Name field -->
+               <label class="control-label " for="name">TestCase Name</label>
+               <input class="form-control" id="name" name="name" type="text"/>
+       </div>
+<div class="form-group"> <!-- Name field -->
+               <label class="control-label " for="name">Description</label>
+       <textarea class="form-control" rows="5" id="desc"></textarea>
+       </div>
+  <button type="submit" class="btn btn-default">Submit</button>
+</form>
+    </div>
+<div class="container" id="result"></div>
+  </div>
+</div>
+</body>
+</html>
diff --git a/utils/test/declaration/testcases.php b/utils/test/declaration/testcases.php
new file mode 100644 (file)
index 0000000..2064580
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+       if(isset($_REQUEST['project'])){
+           $selected=$_REQUEST['project'];
+       }
+       else{
+            $url = "http://testresults.opnfv.org:80/test/api/v1/projects";
+            $response = file_get_contents($url);
+            $data = json_decode($response);
+            $projects=$data->projects;
+           $selected=$projects[0]->name;
+       }
+       $new_url="http://testresults.opnfv.org:80/test/api/v1/projects/".$selected."/cases";
+        $response = file_get_contents($new_url);
+        $data = json_decode($response);
+        $testcases=$data->testcases;
+        $i=0;
+        $column_str="";
+        $column_str=$column_str."<table class=\"table table-striped\"><tr>";
+        $column_str=$column_str."<th>#</th><th>Test Case Name</th>";
+        $column_str=$column_str."<th>Creation Date</th>";
+        $column_str=$column_str."<th>Description</th></tr>";
+        foreach ( $testcases as $testcase ){
+               $i=$i+1;
+               $column_str=$column_str."<tr>";
+               $column_str=$column_str."<td>".$i."</td>";
+               $column_str=$column_str."<td>".$testcase->name."</td>";
+               $column_str=$column_str."<td>".$testcase->creation_date."</td>";
+               $column_str=$column_str."<td>".$testcase->description."</td>";
+               $column_str=$column_str."</tr>";
+
+       }
+        $column_str=$column_str."</table>";
+        echo $column_str;
+
+?>
+