From: Eric Ball Date: Wed, 27 Nov 2019 22:44:20 +0000 (+0000) Subject: Merge "Add verify job for icn/daaas" X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=54f151d26644aef4b467be15117283c1a77037e4;hp=335e1da8e2f5706569c86ff3574fcc8c69b5208e Merge "Add verify job for icn/daaas" --- diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 97ca88c..79d16d9 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -30,7 +30,14 @@ - ubuntu1604 - ubuntu1804 - centos7 - + #-------------------------------- + # IEC TYPE DEFINITINONS + # type1 Mcbin embeded board + # type2 Arm Server + # ------------------------------- + iecType: + - type1 + - type2 # ------------------------------- # DEPLOY TYPE DEFINITIONS # ------------------------------- @@ -50,6 +57,8 @@ os: centos7 - installer: compass os: ubuntu1804 + - iecType: type1 + installer: fuel # ------------------------------- # USECASE DEFINITIONS @@ -60,10 +69,10 @@ scenario: 'k8-calico-iec-noha' jobs: - - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}' - - 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' - - 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' - - 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' + - 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}' + - 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' + - 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' + - 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' ############## # PARAMETERS # @@ -145,7 +154,7 @@ # job templates ######################## - job-template: - name: 'iec-{installer}-{deploy_type}-{os}-daily-{stream}' + name: 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}' disabled: '{obj:disabled}' concurrent: false node: '{slave-label}' @@ -164,10 +173,10 @@ wrappers: - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE' triggers: - - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}-trigger' + - 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}-trigger' parameters: - lf-infra-parameters: @@ -179,10 +188,13 @@ - string: name: DEPLOY_SCENARIO default: '{scenario}' + - string: + name: IEC_TYPE + default: '{iecType}' builders: - trigger-builds: - - project: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' + - project: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' current-parameters: true predefined-parameters: DEPLOY_SCENARIO={scenario} @@ -200,7 +212,7 @@ - project: !j2: | {%- for uc in usecase -%} - iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }} + iec-{{ iecType }}-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }} {%- if not loop.last -%},{%- endif -%} {%- endfor %} current-parameters: true @@ -210,15 +222,16 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - - project: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' + - project: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' current-parameters: false predefined-parameters: DEPLOY_SCENARIO={scenario} + IEC_TYPE='{iecType}' same-node: true block: true - job-template: - name: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' + name: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' concurrent: true node: '{slave-label}' properties: &properties @@ -230,9 +243,9 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '.*-deploy-{installer}-{deploy_type}-.*' - - '.*-destroy-{installer}-{deploy_type}-.*' - - '.*-install-.*-{installer}-{deploy_type}-.*' + - '.*-{iecType}-deploy-{installer}-{deploy_type}-.*' + - '.*-{iecType}-destroy-{installer}-{deploy_type}-.*' + - '.*-{iecType}-install-.*-{installer}-{deploy_type}-.*' blocking-level: 'NODE' parameters: @@ -245,13 +258,16 @@ - string: name: DEPLOY_SCENARIO default: '{scenario}' + - string: + name: IEC_TYPE + default: '{iecType}' - string: name: EXTRA_ARGS default: '-o {os}' wrappers: &wrappers - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' + name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE' scm: &scm - git: @@ -296,7 +312,7 @@ - lf-infra-publish - job-template: - name: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' + name: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' concurrent: true node: '{slave-label}' properties: *properties @@ -310,6 +326,9 @@ - string: name: DEPLOY_SCENARIO default: '{scenario}' + - string: + name: IEC_TYPE + default: '{iecType}' - string: name: EXTRA_ARGS default: '-EEE -o {os}' @@ -326,7 +345,7 @@ publishers: *publishers - job-template: - name: 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' + name: 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' concurrent: true node: '{slave-label}' properties: *properties @@ -359,30 +378,34 @@ # Akraino IEC CI Baremetal Triggers running against master branch # ---------------------------------------------------------------- - trigger: - name: 'iec-fuel-virtual-ubuntu1604-daily-master-trigger' + name: 'iec-type2-fuel-virtual-ubuntu1604-daily-master-trigger' triggers: - timed: '0 1 * * 1,3,5' - trigger: - name: 'iec-fuel-baremetal-ubuntu1604-daily-master-trigger' + name: 'iec-type2-fuel-baremetal-ubuntu1604-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'iec-compass-virtual-ubuntu1604-daily-master-trigger' + name: 'iec-type2-compass-virtual-ubuntu1604-daily-master-trigger' triggers: - timed: '0 13 * * *' - trigger: - name: 'iec-fuel-virtual-ubuntu1804-daily-master-trigger' + name: 'iec-type2-fuel-virtual-ubuntu1804-daily-master-trigger' triggers: - timed: '0 1 * * 2,6' - trigger: - name: 'iec-fuel-baremetal-ubuntu1804-daily-master-trigger' + name: 'iec-type2-fuel-baremetal-ubuntu1804-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'iec-fuel-virtual-centos7-daily-master-trigger' + name: 'iec-type2-fuel-virtual-centos7-daily-master-trigger' triggers: - timed: '0 1 * * 4,7' - trigger: - name: 'iec-fuel-baremetal-centos7-daily-master-trigger' + name: 'iec-type2-fuel-baremetal-centos7-daily-master-trigger' triggers: - timed: '' +- trigger: + name: 'iec-type1-compass-virtual-ubuntu1604-daily-master-trigger' + triggers: + - timed: '0 19 * * *' diff --git a/jjb/shell/run_bluval.sh b/jjb/shell/run_bluval.sh index 5870ed9..c701b0f 100755 --- a/jjb/shell/run_bluval.sh +++ b/jjb/shell/run_bluval.sh @@ -12,18 +12,21 @@ set -o errexit set -o pipefail cwd=$(pwd) +current_user=$(whoami) is_optional="false" -finish() { - # Fix ownership of output files - user_id=$(stat -c '%u:%g' $cwd) - sudo chown -R ${user_id} $results_dir -} - info () { logger -s -t "run_blu_val.info" "$*" } +change_res_owner() { +# change owner of results created by root in container + if [ -d "$results_dir" ] + then + sudo chown -R "$current_user" "$results_dir" + fi +} + usage() { echo "usage: $0 -n " >&2 echo "[-r results dir">&2 @@ -118,8 +121,6 @@ then fi fi -trap finish EXIT - if [ ! -d "$cwd/validation" ] then git clone http://gerrit.akraino.org/r/validation @@ -142,5 +143,17 @@ if [ "$is_optional" == "true" ] || [ "$OPTIONAL" == "yes" ] then options+=" -o" fi + +set +e +# even if the script fails we need to change the owner of results # shellcheck disable=SC2086 python3 validation/bluval/blucon.py $options "$blueprint_name" + +if [ $? -ne 0 ]; then + change_res_owner + error "Bluval validation failed!" +fi + +set -e + +change_res_owner