From: Eric Ball Date: Tue, 21 Apr 2020 21:26:23 +0000 (+0000) Subject: Merge "iec: view: Stop filtering out the sonar job" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=749cd96930ccde59751a92d8c0b88ef0929f3efc;hp=a03b5e0a3fa9fe07691b41dfdbe02215dbfa651e Merge "iec: view: Stop filtering out the sonar job" --- diff --git a/jjb/akraino-templates/akraino-validation-templates.yaml b/jjb/akraino-templates/akraino-validation-templates.yaml index 33fb9be..c84e4c4 100644 --- a/jjb/akraino-templates/akraino-validation-templates.yaml +++ b/jjb/akraino-templates/akraino-validation-templates.yaml @@ -151,16 +151,21 @@ builders: - description-setter: - description: "POD: $NODE_NAME" + description: "POD: $NODE_NAME
BLUEPRINT: $BLUEPRINT
LAB: $LAB_SILO
LAYER: $LAYER" - lf-infra-create-netrc: server-id: logs - shell: !include-raw-escape: - ../shell/run_bluval.sh publishers: + - robot: + output-path: 'results' + report-html: '**/report.html' + log-html: '**/log.html' + output-xml: '**/output.xml' - logparser: use-project-rules: true parse-rules: "./bluval/rules.txt" - unstable-on-warning: true + unstable-on-warning: false fail-on-error: true - show-graphs: false + show-graphs: true diff --git a/jjb/shell/run_bluval.sh b/jjb/shell/run_bluval.sh index fc16781..fbe9aed 100755 --- a/jjb/shell/run_bluval.sh +++ b/jjb/shell/run_bluval.sh @@ -49,6 +49,7 @@ usage() { verify_connectivity() { local ip=$1 info "Verifying connectivity to $ip..." + # shellcheck disable=SC2034 for i in $(seq 0 10); do if ping -c 1 -W 1 "$ip" > /dev/null; then info "$ip is reachable!" @@ -141,10 +142,10 @@ sed -i \ "$volumes_path" # create ssh_key_dir -mkdir -p $cwd/ssh_key_dir +mkdir -p "$cwd/ssh_key_dir" # copy ssh_key in ssh_key_dir -cp $ssh_key $cwd/ssh_key_dir/id_rsa +cp "$ssh_key" "$cwd/ssh_key_dir/id_rsa" variables_path="$cwd/tests/variables.yaml" # update information in variables yaml @@ -162,13 +163,18 @@ then options+=" -o" fi -printf 'ok / PASS /\nerror / FAIL /\n' > ./bluval/rules.txt - set +e -# even if the script fails we need to change the owner of results -# shellcheck disable=SC2086 -python3 bluval/blucon.py $options "$blueprint_name" +if python3 --version > /dev/null; then + # shellcheck disable=SC2086 + python3 bluval/blucon.py $options "$blueprint_name" +else + # shellcheck disable=SC2086 + VALIDATION_DIR="$WORKSPACE" RESULTS_DIR="$WORKSPACE/results" \ + bluval/blucon.sh $options "$blueprint_name" +fi +# even if the script fails we need to change the owner of results +# shellcheck disable=SC2181 if [ $? -ne 0 ]; then change_res_owner error "Bluval validation FAIL " @@ -183,11 +189,9 @@ else TIMESTAMP=$(date +'%Y%m%d-%H%M%S') NEXUS_URL=https://nexus.akraino.org/ NEXUS_PATH="${LAB_SILO}/bluval_results/${blueprint_name}/${VERSION}/${TIMESTAMP}" - BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}/" zip -r results.zip ./results lftools deploy nexus-zip "$NEXUS_URL" logs "$NEXUS_PATH" results.zip rm results.zip fi rm -f ~/.netrc -