diff options
-rwxr-xr-x | jjb/3rd_party_ci/functest-netvirt.sh | 7 | ||||
-rw-r--r-- | jjb/3rd_party_ci/odl-netvirt.yml | 12 | ||||
-rw-r--r-- | jjb/global/slave-params.yml | 14 | ||||
-rwxr-xr-x | jjb/infra/bifrost-upload-logs.sh | 29 | ||||
-rw-r--r-- | jjb/infra/bifrost-verify-jobs.yml | 4 | ||||
-rw-r--r-- | jjb/storperf/storperf.yml | 5 | ||||
-rwxr-xr-x | utils/fetch_os_creds.sh | 11 | ||||
-rw-r--r-- | utils/test/declaration/addtestcase.php | 40 | ||||
-rw-r--r-- | utils/test/declaration/index.php | 221 | ||||
-rw-r--r-- | utils/test/declaration/testcases.php | 36 |
10 files changed, 57 insertions, 322 deletions
diff --git a/jjb/3rd_party_ci/functest-netvirt.sh b/jjb/3rd_party_ci/functest-netvirt.sh deleted file mode 100755 index adffaf42d..000000000 --- a/jjb/3rd_party_ci/functest-netvirt.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e - -# wipe the WORKSPACE -/bin/rm -rf $WORKSPACE/* - -echo "Hello World" diff --git a/jjb/3rd_party_ci/odl-netvirt.yml b/jjb/3rd_party_ci/odl-netvirt.yml index ca1936156..054761ea7 100644 --- a/jjb/3rd_party_ci/odl-netvirt.yml +++ b/jjb/3rd_party_ci/odl-netvirt.yml @@ -20,8 +20,6 @@ slave-label: 'ericsson-virtual5' - 'install-netvirt': slave-label: 'odl-netvirt-virtual' - - 'functest': - slave-label: 'odl-netvirt-virtual' - 'postprocess': slave-label: 'odl-netvirt-virtual' ##################################### @@ -119,9 +117,8 @@ name: functest condition: SUCCESSFUL projects: - - name: 'functest-netvirt-virtual-suite-{stream}' + - name: 'functest-netvirt-virtual-daily-{stream}' predefined-parameters: | - FUNCTEST_SUITE_NAME=vping_userdata,bgpvpn RC_FILE_PATH=/home/jenkins/cloner-info/overcloudrc DEPLOY_SCENARIO=os-odl_l2-bgpvpn-noha node-parameters: true @@ -162,7 +159,7 @@ use-build-blocker: true blocking-jobs: - 'odl-netvirt-verify-virtual-install-.*' - - 'odl-netvirt-verify-virtual-functest-.*' + - 'functest-netvirt-virtual-daily-.*' - 'odl-netvirt-verify-virtual-postprocess-.*' block-level: 'NODE' @@ -200,11 +197,6 @@ - shell: !include-raw: ./install-netvirt.sh - builder: - name: 'netvirt-verify-functest-builder' - builders: - - shell: - !include-raw: ./functest-netvirt.sh -- builder: name: 'netvirt-verify-postprocess-builder' builders: - shell: diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 39a1b1b9c..9d08487a3 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -364,6 +364,20 @@ default: /root/.ssh/id_rsa description: 'SSH key to use for Apex' - parameter: + name: 'intel-pod9-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod9 + default-slaves: + - intel-pod9 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: name: 'intel-pod3-defaults' parameters: - node: diff --git a/jjb/infra/bifrost-upload-logs.sh b/jjb/infra/bifrost-upload-logs.sh index a03365942..8e1982dff 100755 --- a/jjb/infra/bifrost-upload-logs.sh +++ b/jjb/infra/bifrost-upload-logs.sh @@ -13,17 +13,40 @@ set -o pipefail BIFROST_CONSOLE_LOG="${BUILD_URL}/consoleText" BIFROST_GS_URL=${BIFROST_LOG_URL/http:/gs:} +BIFROST_COMPRESS_SUFFIX="tar.gz" +BIFROST_COMPRESSED_LOGS=() echo "Uploading build logs to ${BIFROST_LOG_URL}" echo "Uploading console output" -curl -L ${BIFROST_CONSOLE_LOG} | gsutil cp - ${BIFROST_GS_URL}/console.txt +curl -L ${BIFROST_CONSOLE_LOG} | gsutil cp - ${BIFROST_GS_URL}/build_log.txt [[ ! -d ${WORKSPACE}/logs ]] && exit 0 pushd ${WORKSPACE}/logs/ &> /dev/null for x in *.log; do echo "Compressing and uploading $x" - tar -czf - $x | gsutil cp - ${BIFROST_GS_URL}/$x.tar.gz + tar -czf - $x | gsutil cp - ${BIFROST_GS_URL}/${x}.${BIFROST_COMPRESS_SUFFIX} 1>/dev/null + BIFROST_COMPRESSED_LOGS+=(${x}.${BIFROST_COMPRESS_SUFFIX}) done -popd ${WORKSPACE}/logs &> /dev/null +popd &> /dev/null + +echo "Generating the landing page" +cat > index.html << EOF +<html> +<h1>Build results for <a href=https://$GERRIT_NAME/#/c/$GERRIT_CHANGE_NUMBER>$GERRIT_NAME/$GERRIT_CHANGE_NUMBER</a></h1> +<h2>Job: $JOB_NAME</h2> +<ul> +<li><a href=${BIFROST_LOG_URL}/build_log.txt>build_log.txt</a></li> +EOF + +for x in ${BIFROST_COMPRESSED_LOGS[@]}; do + echo "<li><a href=${BIFROST_LOG_URL}/${x}>${x}</a></li>" >> index.html +done + +cat >> index.html << EOF +</ul> +</html> +EOF + +gsutil cp index.html ${BIFROST_GS_URL}/index.html diff --git a/jjb/infra/bifrost-verify-jobs.yml b/jjb/infra/bifrost-verify-jobs.yml index cbe21e256..6232859ee 100644 --- a/jjb/infra/bifrost-verify-jobs.yml +++ b/jjb/infra/bifrost-verify-jobs.yml @@ -163,7 +163,7 @@ exclude-no-code-change: 'false' - comment-added-contains-event: comment-contains-value: 'recheck' - custom-url: '* $JOB_NAME $BIFROST_LOG_URL' + custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' silent-start: true projects: - project-compare-type: 'PLAIN' @@ -192,7 +192,7 @@ comment-contains-value: 'recheck' - comment-added-contains-event: comment-contains-value: 'reverify' - custom-url: '* $JOB_NAME $BIFROST_LOG_URL' + custom-url: '* $JOB_NAME $BIFROST_LOG_URL/index.html' projects: - project-compare-type: 'ANT' project-pattern: 'releng' diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index 902fff999..8f42f8c06 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -144,15 +144,14 @@ # Required Variables: # stream: branch with - in place of / (eg. stable) # branch: branch (eg. stable) - node: storperf-pod - - disabled: false + disabled: '{obj:disabled}' parameters: - project-parameter: project: '{project}' - gerrit-parameter: branch: '{branch}' + - 'intel-pod9-defaults' scm: - git-scm diff --git a/utils/fetch_os_creds.sh b/utils/fetch_os_creds.sh index 3667dbe6c..856f69a27 100755 --- a/utils/fetch_os_creds.sh +++ b/utils/fetch_os_creds.sh @@ -38,6 +38,16 @@ verify_connectivity() { error "Can not talk to $ip." } + +swap_to_public() { + if [ "$1" != "" ]; then + info "Exchanging keystone public IP in rc file to $public_ip" + sed -i "/OS_AUTH_URL/c\export OS_AUTH_URL=\'$public_ip'" $dest_path + sed -i 's/internalURL/publicURL/g' $dest_path + fi +} + + : ${DEPLOY_TYPE:=''} #Get options @@ -151,6 +161,7 @@ elif [ "$installer_type" == "compass" ]; then | grep identity | awk '{print $14}') fi info "public_ip: $public_ip" + swap_to_public $public_ip elif [ "$installer_type" == "joid" ]; then diff --git a/utils/test/declaration/addtestcase.php b/utils/test/declaration/addtestcase.php deleted file mode 100644 index 0e5bed689..000000000 --- a/utils/test/declaration/addtestcase.php +++ /dev/null @@ -1,40 +0,0 @@ -<?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 deleted file mode 100644 index b2c5d0370..000000000 --- a/utils/test/declaration/index.php +++ /dev/null @@ -1,221 +0,0 @@ -<!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 deleted file mode 100644 index 20645807e..000000000 --- a/utils/test/declaration/testcases.php +++ /dev/null @@ -1,36 +0,0 @@ -<?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; - -?> - |