diff options
52 files changed, 466 insertions, 452 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index d6bb48555..74f67ce5f 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -128,7 +128,7 @@ if [[ "$JOB_NAME" =~ "virtual" ]]; then if [[ "$JOB_NAME" == *csit* ]]; then DEPLOY_CMD="${DEPLOY_CMD} -e csit-environment.yaml" fi - if [[ "$JOB_NAME" == *promote* ]]; then + if [[ "$PROMOTE" == "True" ]]; then DEPLOY_CMD="${DEPLOY_CMD} --virtual-computes 2" fi else diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index 2d39e98b0..206c627ec 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -26,11 +26,10 @@ else echo "Will download RPMs..." # Must be RPMs/ISO - export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") - echo "Downloading opnfv-${OPNFV_ARTIFACT_VERSION}.properties" + echo "Downloading latest properties file" # get the properties file in order to get info regarding artifacts - curl --fail -s -o $BUILD_DIRECTORY/opnfv.properties http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties + curl --fail -s -o $BUILD_DIRECTORY/opnfv.properties http://$GS_URL/latest.properties # source the file so we get OPNFV vars source $BUILD_DIRECTORY/opnfv.properties diff --git a/jjb/apex/apex-snapshot-create.sh b/jjb/apex/apex-snapshot-create.sh index b2a39449e..342896c7d 100644 --- a/jjb/apex/apex-snapshot-create.sh +++ b/jjb/apex/apex-snapshot-create.sh @@ -13,7 +13,11 @@ set -o nounset set -o pipefail SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error) -SNAP_TYPE=$(echo ${JOB_NAME} | sed -n 's/^apex-\(.\+\)-promote.*$/\1/p') + +if [ -z "$SNAP_TYPE" ]; then + echo "ERROR: SNAP_TYPE not provided...exiting" + exit 1 +fi echo "Creating Apex snapshot..." echo "-------------------------" diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 9d0b0148c..25870bb35 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -75,7 +75,10 @@ uploadrpm () { uploadsnap () { # Uploads snapshot artifact and updated properties file echo "Uploading snapshot artifacts" - SNAP_TYPE=$(echo ${JOB_NAME} | sed -n 's/^apex-\(.\+\)-promote.*$/\1/p') + if [ -z "$SNAP_TYPE" ]; then + echo "ERROR: SNAP_TYPE not provided...exiting" + exit 1 + fi gsutil cp $WORKSPACE/apex-${SNAP_TYPE}-snap-`date +%Y-%m-%d`.tar.gz gs://$GS_URL/ > gsutil.iso.log if [ "$SNAP_TYPE" == 'csit' ]; then gsutil cp $WORKSPACE/snapshot.properties gs://$GS_URL/snapshot.properties > gsutil.latest.log diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index ae2186002..50502d77a 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -26,6 +26,7 @@ virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' + concurrent-builds: 3 - danube: branch: 'stable/danube' @@ -34,6 +35,7 @@ virtual-slave: 'apex-virtual-danube' baremetal-slave: 'apex-baremetal-danube' verify-scenario: 'os-odl_l3-nofeature-ha' + concurrent-builds: 1 disabled: false platform: @@ -145,13 +147,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' - throttle: max-per-node: 3 max-total: 10 @@ -209,23 +204,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false # Verify Scenario Gate - job-template: @@ -279,13 +274,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' - throttle: max-per-node: 3 max-total: 10 @@ -310,23 +298,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -374,16 +362,18 @@ node-parameters: false current-parameters: true predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= OPNFV_CLEAN=yes DEPLOY_SCENARIO={verify-scenario} kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: Functest - condition: ALWAYS + name: CPERF + condition: SUCCESSFUL projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'cperf-apex-intel-pod2-daily-master' node-parameters: true current-parameters: false predefined-parameters: @@ -420,15 +410,20 @@ wrappers: - timeout: - timeout: 90 + timeout: 150 fail: true properties: - logrotate-default - throttle: - max-per-node: 3 + max-per-node: {concurrent-builds} max-total: 10 option: 'project' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify-iso-{stream}' builders: - 'apex-build' @@ -467,11 +462,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - throttle: max-per-node: 1 max-total: 10 @@ -809,7 +799,7 @@ node-parameters: false current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha OPNFV_CLEAN=yes kill-phase-on: NEVER abort-all-job: true @@ -1164,6 +1154,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1190,7 +1181,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1200,7 +1193,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1262,12 +1257,13 @@ - name: 'apex-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1277,7 +1273,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1287,7 +1285,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -1327,6 +1327,10 @@ name: GS_URL default: $GS_BASE{gs-pathname} description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 3f10e214b..84a899f57 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -26,6 +26,7 @@ virtual-slave: 'apex-virtual-master' baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' + concurrent-builds: 3 - danube: branch: 'stable/danube' @@ -34,6 +35,7 @@ virtual-slave: 'apex-virtual-danube' baremetal-slave: 'apex-baremetal-danube' verify-scenario: 'os-odl_l3-nofeature-ha' + concurrent-builds: 1 disabled: false platform: @@ -145,13 +147,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' - throttle: max-per-node: 3 max-total: 10 @@ -209,23 +204,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false # Verify Scenario Gate - job-template: @@ -279,13 +274,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-daily.*' - - 'apex-deploy.*' - - 'apex-runner.*' - throttle: max-per-node: 3 max-total: 10 @@ -310,23 +298,23 @@ kill-phase-on: FAILURE abort-all-job: true git-revision: true - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO={verify-scenario} - FUNCTEST_SUITE_NAME=healthcheck - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: false +# - multijob: +# name: functest-smoke +# condition: SUCCESSFUL +# projects: +# - name: 'functest-apex-virtual-suite-{stream}' +# current-parameters: false +# predefined-parameters: | +# DEPLOY_SCENARIO={verify-scenario} +# FUNCTEST_SUITE_NAME=healthcheck +# GERRIT_BRANCH=$GERRIT_BRANCH +# GERRIT_REFSPEC=$GERRIT_REFSPEC +# GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER +# GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE +# node-parameters: true +# kill-phase-on: FAILURE +# abort-all-job: true +# git-revision: false - job-template: name: 'apex-runner-cperf-{stream}' @@ -374,16 +362,18 @@ node-parameters: false current-parameters: true predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC= OPNFV_CLEAN=yes DEPLOY_SCENARIO={verify-scenario} kill-phase-on: FAILURE abort-all-job: true git-revision: false - multijob: - name: Functest - condition: ALWAYS + name: CPERF + condition: SUCCESSFUL projects: - - name: 'functest-apex-baremetal-daily-{stream}' + - name: 'cperf-apex-intel-pod2-daily-master' node-parameters: true current-parameters: false predefined-parameters: @@ -420,15 +410,20 @@ wrappers: - timeout: - timeout: 90 + timeout: 150 fail: true properties: - logrotate-default - throttle: - max-per-node: 3 + max-per-node: {concurrent-builds} max-total: 10 option: 'project' + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify-iso-{stream}' builders: - 'apex-build' @@ -467,11 +462,6 @@ properties: - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-deploy.*' - throttle: max-per-node: 1 max-total: 10 @@ -803,6 +793,7 @@ GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -829,7 +820,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -839,7 +832,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=csit node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -901,12 +896,13 @@ - name: 'apex-deploy-virtual-{stream}' current-parameters: false predefined-parameters: | - DEPLOY_SCENARIO=os-odl_l2-netvirt_gbp_fdio-noha + DEPLOY_SCENARIO=os-odl_netvirt-fdio-noha OPNFV_CLEAN=yes GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + PROMOTE=True node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -916,7 +912,9 @@ condition: SUCCESSFUL projects: - name: 'apex-create-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -926,7 +924,9 @@ condition: SUCCESSFUL projects: - name: 'apex-upload-snapshot' - current-parameters: true + current-parameters: false + predefined-parameters: | + SNAP_TYPE=fdio node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -966,6 +966,10 @@ name: GS_URL default: $GS_BASE{gs-pathname} description: "URL to Google Storage." + - string: + name: PROMOTE + default: 'False' + description: "Flag to know if we should promote/upload snapshot artifacts." ######################## # builder macros diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index bff7d3b5a..dc9107a11 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -15,7 +15,7 @@ danube: - 'os-nosdn-kvm-noha' - 'os-odl_l2-fdio-noha' - 'os-odl_l2-fdio-ha' - - 'os-odl_l2-netvirt_gbp_fdio-noha' + - 'os-odl_netvirt-fdio-noha' - 'os-odl_l2-sfc-noha' - 'os-odl_l3-nofeature-noha' - 'os-odl_l3-nofeature-ha' diff --git a/jjb/bottlenecks/bottlenecks-run-suite.sh b/jjb/bottlenecks/bottlenecks-run-suite.sh index 0df659af2..e6f8d1ba5 100644 --- a/jjb/bottlenecks/bottlenecks-run-suite.sh +++ b/jjb/bottlenecks/bottlenecks-run-suite.sh @@ -2,6 +2,7 @@ #set -e [[ $GERRIT_REFSPEC_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" BOTTLENECKS_IMAGE=opnfv/bottlenecks +REPORT="True" if [[ $SUITE_NAME == rubbos || $SUITE_NAME == vstf ]]; then echo "Bottlenecks: to pull image $BOTTLENECKS_IMAGE:${DOCKER_TAG}" @@ -53,11 +54,11 @@ else echo "Bottlenecks: pulling tutum/influxdb for yardstick" docker pull tutum/influxdb:0.13 sleep 5 - docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE + docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE $REPORT elif [[ $SUITE_NAME == posca_stress_ping ]]; then TEST_CASE=posca_factor_ping sleep 5 - docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE + docker exec bottleneckcompose_bottlenecks_1 python ${POSCA_SCRIPT}/run_posca.py testcase $TEST_CASE $REPORT fi echo "Bottlenecks: cleaning up docker-compose images and dockers" diff --git a/jjb/securityaudit/opnfv-security-audit.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index 732df8925..732df8925 100644 --- a/jjb/securityaudit/opnfv-security-audit.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml diff --git a/jjb/compass4nfv/compass-build.sh b/jjb/compass4nfv/compass-build.sh index 093debba7..ea98c05a9 100644 --- a/jjb/compass4nfv/compass-build.sh +++ b/jjb/compass4nfv/compass-build.sh @@ -24,7 +24,16 @@ then fi cd $WORKSPACE/ -./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY + +if [[ "$BRANCH" == 'danube' ]]; then + ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY + OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1) + OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso +else + ./build.sh --tar-dir $BUILD_DIRECTORY/ --tar-name compass.tar.gz -c $CACHE_DIRECTORY + OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/compass.tar.gz | cut -d' ' -f1) + OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.tar.gz +fi # list the build artifacts ls -al $BUILD_DIRECTORY @@ -34,8 +43,8 @@ ls -al $BUILD_DIRECTORY echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION" echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" - echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)" + echo "OPNFV_ARTIFACT_URL=$OPNFV_ARTIFACT_URL" + echo "OPNFV_ARTIFACT_SHA512SUM=$OPNFV_ARTIFACT_SHA512SUM" echo "OPNFV_BUILD_URL=$BUILD_URL" ) > $BUILD_DIRECTORY/opnfv.properties echo diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index e1e760dab..7d67c37fd 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -11,11 +11,13 @@ branch: '{stream}' gs-pathname: '' disabled: false + openstack-version: ocata danube: &danube stream: danube branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false + openstack-version: newton #-------------------------------- # POD, INSTALLER, AND BRANCH MAPPING #-------------------------------- @@ -23,19 +25,19 @@ #-------------------------------- pod: - baremetal: - slave-label: compass-baremetal + slave-label: compass-baremetal-master os-version: 'xenial' <<: *master - virtual: - slave-label: compass-virtual + slave-label: compass-virtual-master os-version: 'xenial' <<: *master - baremetal: - slave-label: compass-baremetal + slave-label: compass-baremetal-branch os-version: 'xenial' <<: *danube - virtual: - slave-label: compass-virtual + slave-label: compass-virtual-branch os-version: 'xenial' <<: *danube #-------------------------------- @@ -133,6 +135,7 @@ predefined-parameters: | DEPLOY_SCENARIO={scenario} COMPASS_OS_VERSION={os-version} + COMPASS_OPENSTACK_VERSION={openstack-version} same-node: true block: true - trigger-builds: @@ -244,10 +247,6 @@ name: GS_URL default: '$GS_BASE{gs-pathname}' description: "URL to Google Storage." - - choice: - name: COMPASS_OPENSTACK_VERSION - choices: - - 'newton' ######################## # trigger macros diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index 534e17e62..111ac665c 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -23,7 +23,11 @@ fi echo 1 > /proc/sys/vm/drop_caches export CONFDIR=$WORKSPACE/deploy/conf -export ISO_URL=file://$BUILD_DIRECTORY/compass.iso +if [[ "$BRANCH" = 'danube' ]]; then + export ISO_URL=file://$BUILD_DIRECTORY/compass.iso +else + export ISO_URL=file://$BUILD_DIRECTORY/compass.tar.gz +fi cd $WORKSPACE diff --git a/jjb/compass4nfv/compass-download-artifact.sh b/jjb/compass4nfv/compass-download-artifact.sh index 5a63c4aeb..c09a70c8b 100644 --- a/jjb/compass4nfv/compass-download-artifact.sh +++ b/jjb/compass4nfv/compass-download-artifact.sh @@ -18,12 +18,18 @@ curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties # source the file so we get OPNFV vars source $BUILD_DIRECTORY/latest.properties -# download the file -curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 - -# list the file -ls -al $BUILD_DIRECTORY/compass.iso +if [[ "$BRANCH" == 'danube' ]]; then + # download the file + curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 + # list the file + ls -al $BUILD_DIRECTORY/compass.iso +else + # download the file + curl -s -o $BUILD_DIRECTORY/compass.tar.gz http://$OPNFV_ARTIFACT_URL > gsutil.tar.gz.log 2>&1 + # list the file + ls -al $BUILD_DIRECTORY/compass.tar.gz +fi echo echo "--------------------------------------------------------" -echo "Done!"
\ No newline at end of file +echo "Done!" diff --git a/jjb/compass4nfv/compass-upload-artifact.sh b/jjb/compass4nfv/compass-upload-artifact.sh index 73b7f07fa..c6e179d4e 100644 --- a/jjb/compass4nfv/compass-upload-artifact.sh +++ b/jjb/compass4nfv/compass-upload-artifact.sh @@ -7,6 +7,11 @@ echo "Uploading the $INSTALLER_TYPE artifact. This could take some time..." echo "--------------------------------------------------------" echo +if [[ "$BRANCH" == 'danube' ]]; then + FILETYPE='iso' +else + FILETYPE='tar.gz' +fi # source the opnfv.properties to get ARTIFACT_VERSION source $BUILD_DIRECTORY/opnfv.properties @@ -23,16 +28,16 @@ signiso () { time gpg2 -vvv --batch --yes --no-tty \ --default-key opnfv-helpdesk@rt.linuxfoundation.org \ --passphrase besteffort \ - --detach-sig $BUILD_DIRECTORY/compass.iso + --detach-sig $BUILD_DIRECTORY/compass.$FILETYPE -gsutil cp $BUILD_DIRECTORY/compass.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig +gsutil cp $BUILD_DIRECTORY/compass.$FILETYPE.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.$FILETYPE.sig echo "ISO signature Upload Complete!" } signiso # upload artifact and additional files to google storage -gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 +gsutil cp $BUILD_DIRECTORY/compass.$FILETYPE gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.$FILETYPE > gsutil.$FILETYPE.log 2>&1 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 @@ -44,19 +49,19 @@ gsutil -m setmeta \ gsutil -m setmeta \ -h "Cache-Control:private, max-age=0, no-transform" \ - gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 + gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.$FILETYPE > /dev/null 2>&1 # disabled errexit due to gsutil setmeta complaints # BadRequestException: 400 Invalid argument # check if we uploaded the file successfully to see if things are fine -gsutil ls gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1 +gsutil ls gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.$FILETYPE > /dev/null 2>&1 if [[ $? -ne 0 ]]; then echo "Problem while uploading artifact!" - echo "Check log $WORKSPACE/gsutil.iso.log on the machine where this build is done." + echo "Check log $WORKSPACE/gsutil.$FILETYPE.log on the machine where this build is done." exit 1 fi echo echo "--------------------------------------------------------" echo "Done!" -echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" +echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.$FILETYPE" diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index 56f54d838..60ea3f679 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -13,11 +13,15 @@ gs-pathname: '' ppa-pathname: '/{stream}' disabled: false + openstack-version: 'ocata' + branch-type: 'master' - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' ppa-pathname: '/{stream}' disabled: false + openstack-version: 'newton' + branch-type: 'branch' distro: - 'xenial': @@ -108,7 +112,7 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'compass-virtual-defaults' + - 'compass-virtual-{branch-type}-defaults' - '{installer}-defaults' - 'compass-verify-defaults': installer: '{installer}' @@ -143,6 +147,7 @@ current-parameters: true predefined-parameters: | COMPASS_OS_VERSION={os-version} + COMPASS_OPENSTACK_VERSION={openstack-version} node-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -227,7 +232,7 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'compass-virtual-defaults' + - 'compass-virtual-{branch-type}-defaults' - '{installer}-defaults' - 'compass-verify-defaults': installer: '{installer}' @@ -344,10 +349,6 @@ name: PPA_CACHE default: "$WORKSPACE/work/repo/" - choice: - name: COMPASS_OPENSTACK_VERSION - choices: - - 'newton' - - choice: name: COMPASS_OS_VERSION choices: - 'xenial' diff --git a/jjb/daisy4nfv/daisy-deploy.sh b/jjb/daisy4nfv/daisy-deploy.sh index b512e3f60..785f3a571 100755 --- a/jjb/daisy4nfv/daisy-deploy.sh +++ b/jjb/daisy4nfv/daisy-deploy.sh @@ -6,7 +6,7 @@ echo "--------------------------------------------------------" echo "This is $INSTALLER_TYPE deploy job!" echo "--------------------------------------------------------" -DEPLOY_SCENARIO=${DEPLOY_SCENARIO:-"os-nosdn-nofeature-ha"} +DEPLOY_SCENARIO=${DEPLOY_SCENARIO:-"os-nosdn-nofeature-noha"} BRIDGE=${BRIDGE:-pxebr} LAB_NAME=${NODE_NAME/-*} POD_NAME=${NODE_NAME/*-} @@ -29,7 +29,7 @@ git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/securedlab --quiet \ cp -r securedlab/labs . DEPLOY_COMMAND="sudo ./ci/deploy/deploy.sh -b $BASE_DIR \ - -l $LAB_NAME -p $POD_NAME -B $BRIDGE" + -l $LAB_NAME -p $POD_NAME -B $BRIDGE -s $DEPLOY_SCENARIO" # log info to console echo """ diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index e631ee9b9..0a9d43d25 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -71,7 +71,7 @@ project: '{project}' branch: '{branch}' - 'opnfv-build-centos-defaults' - - 'daisy-defaults' + - '{installer}-defaults' - '{installer}-project-parameter': gs-pathname: '{gs-pathname}' @@ -157,7 +157,8 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'daisy-defaults' + - '{installer}-defaults' + - '{slave-label}-defaults' - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT @@ -165,8 +166,6 @@ - string: name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-ha' - - 'daisy-defaults' - - '{slave-label}-defaults' - '{installer}-project-parameter': gs-pathname: '{gs-pathname}' diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 9e7b867af..561ffbe24 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -54,6 +54,11 @@ enabled: true max-total: 4 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{alias}-merge-(master|danube)' + block-level: 'NODE' scm: - git-scm @@ -148,7 +153,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '{alias}-merge-(master|danube)' + - '{alias}-merge-{phase}-.*' block-level: 'NODE' scm: @@ -164,6 +169,7 @@ - project-parameter: project: '{project}' branch: '{branch}' + - '{installer}-defaults' - '{slave-label}-defaults' - '{alias}-merge-defaults': gs-pathname: '{gs-pathname}' diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index a0ec2ebd7..dff0ff0a4 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -47,8 +47,14 @@ enabled: true max-total: 4 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-merge-build-.*' + block-level: 'NODE' + scm: - - git-scm + - git-scm-gerrit wrappers: - ssh-agent-wrapper - timeout: @@ -103,8 +109,13 @@ name: unit condition: SUCCESSFUL projects: - - name: '{alias}-verify-{name}-{stream}' - current-parameters: true + - name: '{alias}-verify-unit-{stream}' + current-parameters: false + predefined-parameters: | + BRANCH=$BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: false kill-phase-on: FAILURE abort-all-job: true @@ -133,8 +144,15 @@ enabled: true max-total: 6 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-merge-build-.*' + - '{alias}-verify-build-.*' + block-level: 'NODE' + scm: - - git-scm + - git-scm-gerrit wrappers: - ssh-agent-wrapper - timeout: @@ -144,9 +162,11 @@ - project-parameter: project: '{project}' branch: '{branch}' + - '{installer}-defaults' - '{slave-label}-defaults' - '{alias}-verify-defaults': gs-pathname: '{gs-pathname}' + builders: - description-setter: description: "Built on $NODE_NAME" diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 3ad67b60d..dce7e5862 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -6,9 +6,19 @@ set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +DOVETAIL_HOME=${WORKSPACE}/cvp +if [ -d ${DOVETAIL_HOME} ]; then + sudo rm -rf ${DOVETAIL_HOME}/* +else + sudo mkdir -p ${DOVETAIL_HOME} +fi + +DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config +sudo mkdir -p ${DOVETAIL_CONFIG} + sshkey="" # The path of openrc.sh is defined in fetch_os_creds.sh -OPENRC=$WORKSPACE/opnfv-openrc.sh +OPENRC=${DOVETAIL_CONFIG}/env_config.sh if [[ ${INSTALLER_TYPE} == 'apex' ]]; then instack_mac=$(sudo virsh domiflist undercloud | grep default | \ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") @@ -37,14 +47,15 @@ releng_repo=${WORKSPACE}/releng git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null if [[ ${INSTALLER_TYPE} != 'joid' ]]; then - ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + sudo /bin/bash ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} fi if [[ -f $OPENRC ]]; then echo "INFO: openstack credentials path is $OPENRC" cat $OPENRC else - echo "ERROR: file $OPENRC does not exist." + echo "ERROR: cannot find file $OPENRC. Please check if it is existing." + sudo ls -al ${DOVETAIL_CONFIG} exit 1 fi @@ -65,13 +76,8 @@ else echo "HA test cases may not run properly." fi -pod_file_dir="/home/opnfv/dovetail/userconfig" -if [ -d ${pod_file_dir} ]; then - sudo rm -rf ${pod_file_dir}/* -else - sudo mkdir -p ${pod_file_dir} -fi -cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml" +cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ + -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" echo ${cmd} ${cmd} @@ -79,11 +85,12 @@ deactivate cd ${WORKSPACE} -if [ -f ${pod_file_dir}/pod.yaml ]; then - echo "file ${pod_file_dir}/pod.yaml:" - cat ${pod_file_dir}/pod.yaml +if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then + echo "file ${DOVETAIL_CONFIG}/pod.yaml:" + cat ${DOVETAIL_CONFIG}/pod.yaml else - echo "Error: There doesn't exist file ${pod_file_dir}/pod.yaml." + echo "Error: cannot find file ${DOVETAIL_CONFIG}/pod.yaml. Please check if it is existing." + sudo ls -al ${DOVETAIL_CONFIG} echo "HA test cases may not run properly." fi @@ -91,20 +98,22 @@ ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" if [ "$INSTALLER_TYPE" == "fuel" ]; then echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." - sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${pod_file_dir}/id_rsa + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa fi +# sdnvpn test case needs to download this image first before running +sudo wget -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} + opts="--privileged=true -id" -results_envs="-v /var/run/docker.sock:/var/run/docker.sock \ - -v /home/opnfv/dovetail/results:/home/opnfv/dovetail/results" -openrc_volume="-v ${OPENRC}:${OPENRC}" -userconfig_volume="-v ${pod_file_dir}:${pod_file_dir}" + +docker_volume="-v /var/run/docker.sock:/var/run/docker.sock" +dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}" # Pull the image with correct tag echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}" docker pull opnfv/dovetail:$DOCKER_TAG >$redirect -cmd="docker run ${opts} ${results_envs} ${openrc_volume} ${userconfig_volume} \ +cmd="docker run ${opts} -e DOVETAIL_HOME=${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \ ${sshkey} opnfv/dovetail:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} @@ -126,13 +135,13 @@ if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then fi list_cmd="dovetail list ${TESTSUITE}" -run_cmd="dovetail run --openrc ${OPENRC} --testsuite ${TESTSUITE} -d" +run_cmd="dovetail run --testsuite ${TESTSUITE} -d" echo "Container exec command: ${list_cmd}" docker exec $container_id ${list_cmd} echo "Container exec command: ${run_cmd}" docker exec $container_id ${run_cmd} -sudo cp -r ${DOVETAIL_REPO_DIR}/results ./ +sudo cp -r ${DOVETAIL_HOME}/results ./ # To make sure the file owner is the current user, for the copied results files in the above line # if not, there will be error when next time to wipe workspace # CURRENT_USER=${SUDO_USER:-$USER} diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index e1a4c0267..2c0d12a80 100755 --- a/jjb/fuel/fuel-build.sh +++ b/jjb/fuel/fuel-build.sh @@ -7,6 +7,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## + +# disable Fuel iso build for master branch +if [[ "$BRANCH" == 'master' ]]; then + touch $WORKSPACE/.noupload + echo "--------------------------------------------------------" + echo "Done!" + exit 0 +fi + set -o errexit set -o nounset set -o pipefail diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 5432c9447..dd0590c72 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -303,19 +303,19 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 20 * * *' + - timed: '' # '5 20 * * *' - trigger: name: 'fuel-os-odl_l2-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 23 * * *' + - timed: '' # '5 23 * * *' - trigger: name: 'fuel-os-odl_l3-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 2 * * *' + - timed: '' # '5 2 * * *' - trigger: name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 5 * * *' + - timed: '' # '5 5 * * *' - trigger: name: 'fuel-os-onos-sfc-ha-baremetal-daily-master-trigger' triggers: @@ -327,23 +327,23 @@ - trigger: name: 'fuel-os-odl_l2-sfc-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 11 * * *' + - timed: '' # '5 11 * * *' - trigger: name: 'fuel-os-odl_l2-bgpvpn-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 14 * * *' + - timed: '' # '5 14 * * *' - trigger: name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger' triggers: - - timed: '5 17 * * *' + - timed: '' # '5 17 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master-trigger' triggers: - - timed: '30 12 * * *' + - timed: '' # '30 12 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master-trigger' triggers: - - timed: '30 8 * * *' + - timed: '' # '30 8 * * *' # NOHA Scenarios - trigger: name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' @@ -537,11 +537,11 @@ - trigger: name: 'fuel-os-odl_l2-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: '35 15 * * *' + - timed: '' # '35 15 * * *' - trigger: name: 'fuel-os-odl_l3-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: '5 18 * * *' + - timed: '' # '5 18 * * *' - trigger: name: 'fuel-os-onos-sfc-noha-virtual-daily-master-trigger' triggers: @@ -553,27 +553,27 @@ - trigger: name: 'fuel-os-odl_l2-sfc-noha-virtual-daily-master-trigger' triggers: - - timed: '35 1 * * *' + - timed: '' # '35 1 * * *' - trigger: name: 'fuel-os-odl_l2-bgpvpn-noha-virtual-daily-master-trigger' triggers: - - timed: '5 4 * * *' + - timed: '' # '5 4 * * *' - trigger: name: 'fuel-os-nosdn-kvm-noha-virtual-daily-master-trigger' triggers: - - timed: '35 6 * * *' + - timed: '' # '35 6 * * *' - trigger: name: 'fuel-os-nosdn-ovs-noha-virtual-daily-master-trigger' triggers: - - timed: '5 9 * * *' + - timed: '' # '5 9 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master-trigger' triggers: - - timed: '30 16 * * *' + - timed: '' # '30 16 * * *' - trigger: name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-master-trigger' triggers: - - timed: '30 20 * * *' + - timed: '' # '30 20 * * *' #----------------------------------------------- # Triggers for job running on fuel-virtual against danube branch #----------------------------------------------- diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index f5bbd1818..4d48ee587 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -21,7 +21,7 @@ echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" if [[ "$JOB_NAME" =~ "merge" ]]; then # set simplest scenario for virtual deploys to run for merges DEPLOY_SCENARIO="os-nosdn-nofeature-ha" -else +elif [[ "$BRANCH" != 'master' ]]; then # for none-merge deployments # checkout the commit that was used for building the downloaded artifact # to make sure the ISO and deployment mechanism uses same versions diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index 228cc3da4..5d1ed28f5 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -15,4 +15,7 @@ for test in ${tests[@]}; do let global_ret_val+=$? done -exit $global_ret_val +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo ${global_ret_val}>${ret_val_file} + +exit 0 diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index fc9f34a48..40fc42c76 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -95,12 +95,16 @@ parameters: - string: name: INSTALLER_IP - default: '10.20.0.2' + default: '10.20.7.3' description: 'IP of the installer' - string: name: INSTALLER_TYPE default: daisy description: 'Installer used for deploying OPNFV on this POD' + - string: + name: BRIDGE + default: 'br7' + description: 'pxe bridge for booting of Fuel master' - parameter: name: 'infra-defaults' diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 44666a7d1..57442225c 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -154,6 +154,26 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - parameter: + name: 'compass-baremetal-master-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-baremetal-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'compass-baremetal-branch-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-baremetal-branch' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: name: 'fuel-baremetal-defaults' parameters: - label: @@ -205,6 +225,10 @@ name: SLAVE_LABEL default: 'daisy-baremetal' - string: + name: INSTALLER_IP + default: '10.20.11.2' + description: 'IP of the installer' + - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' @@ -236,6 +260,26 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - parameter: + name: 'compass-virtual-master-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-virtual-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: + name: 'compass-virtual-branch-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'compass-virtual-branch' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' +- parameter: name: 'fuel-virtual-defaults' parameters: - label: @@ -284,6 +328,14 @@ name: SLAVE_LABEL default: 'daisy-virtual' - string: + name: INSTALLER_IP + default: '10.20.11.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'daisy1' + description: 'pxe bridge for booting of Fuel master' + - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' @@ -593,7 +645,7 @@ description: 'Git URL to use on this Jenkins Slave' - string: name: INSTALLER_IP - default: '10.20.7.2' + default: '10.20.7.3' description: 'IP of the installer' - string: name: BRIDGE diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 3b7ec3478..5fe0eb913 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -25,6 +25,9 @@ project: # projects with jobs for master + - 'releng-anteater': + <<: *master + <<: *other-receivers - 'bottlenecks': <<: *master <<: *other-receivers diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index 709a1ebab..cd40050b2 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -13,10 +13,12 @@ branch: '{stream}' gs-pathname: '' disabled: false + docker-tag: 'latest' - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false + docker-tag: 'stable' - job-template: name: 'storperf-verify-{stream}' @@ -149,6 +151,13 @@ project: '{project}' branch: '{branch}' - 'intel-pod9-defaults' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-noha' + - string: + name: DOCKER_TAG + default: '{docker-tag}' + description: 'Tag to pull docker image' scm: - git-scm diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml index c6da9f413..319f8eb28 100644 --- a/jjb/xci/bifrost-verify-jobs.yml +++ b/jjb/xci/bifrost-verify-jobs.yml @@ -20,9 +20,9 @@ # distros #-------------------------------- distro: - - 'trusty': + - 'xenial': disabled: false - dib-os-release: 'trusty' + dib-os-release: 'xenial' dib-os-element: 'ubuntu-minimal' dib-os-packages: 'vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl' extra-dib-elements: 'openssh-server' diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index 2e6f2272c..b522b8969 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -89,7 +89,7 @@ function cleanup_and_upload() { } # check distro to see if we support it -if [[ ! "$DISTRO" =~ (trusty|centos7|suse) ]]; then +if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then echo "Distro $DISTRO is not supported!" exit 1 fi diff --git a/modules/requirements.txt b/modules/requirements.txt index 1eaf8d089..bae55dcd2 100644 --- a/modules/requirements.txt +++ b/modules/requirements.txt @@ -1,3 +1,3 @@ -paramiko>=2.0.1 +paramiko==2.1.2 mock==1.3.0 requests==2.9.1 diff --git a/prototypes/bifrost/scripts/bifrost-provision.sh b/prototypes/bifrost/scripts/bifrost-provision.sh index 056196254..2b9021528 100755 --- a/prototypes/bifrost/scripts/bifrost-provision.sh +++ b/prototypes/bifrost/scripts/bifrost-provision.sh @@ -57,8 +57,8 @@ WRITE_INTERFACES_FILE=true export DIB_DEV_USER_PWDLESS_SUDO=yes export DIB_DEV_USER_PASSWORD=devuser -# Settings for distro: trusty/ubuntu-minimal, 7/centos7, 42.2/suse -export DIB_OS_RELEASE=${DIB_OS_RELEASE:-trusty} +# Settings for distro: xenial/ubuntu-minimal, 7/centos7, 42.2/suse +export DIB_OS_RELEASE=${DIB_OS_RELEASE:-xenial} export DIB_OS_ELEMENT=${DIB_OS_ELEMENT:-ubuntu-minimal} # DIB OS packages diff --git a/prototypes/xci/README.rst b/prototypes/xci/README.rst index 6d7af0d6e..0d9366533 100644 --- a/prototypes/xci/README.rst +++ b/prototypes/xci/README.rst @@ -113,11 +113,17 @@ change into directory where the sandbox script is located execute sandbox script - sudo -E ./xci-deploy.sh + ./xci-deploy.sh Issuing above command will start aio sandbox deployment and the sandbox should be ready between 1,5 and 2 hours depending on the host machine. +Please remember that the user executing the XCI script will need to +have an ssh key available, and stored in $HOME/.ssh directory. +You can generate one by executing + + ssh-keygen -t rsa + Advanced Usage -------------- diff --git a/prototypes/xci/config/env-vars b/prototypes/xci/config/env-vars index cefb412a6..9d4c78258 100755 --- a/prototypes/xci/config/env-vars +++ b/prototypes/xci/config/env-vars @@ -6,7 +6,6 @@ export OPNFV_RELENG_GIT_URL=https://gerrit.opnfv.org/gerrit/releng.git export OPENSTACK_BIFROST_GIT_URL=https://git.openstack.org/openstack/bifrost export OPENSTACK_OSA_GIT_URL=https://git.openstack.org/openstack/openstack-ansible export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy -export CLEAN_DIB_IMAGES=false export OPNFV_HOST_IP=192.168.122.2 export XCI_FLAVOR_ANSIBLE_FILE_PATH=$OPNFV_RELENG_PATH/prototypes/xci/file/$XCI_FLAVOR export CI_LOOP=${CI_LOOP:-daily} diff --git a/prototypes/xci/config/user-vars b/prototypes/xci/config/user-vars index f9de940a2..5ed539627 100755 --- a/prototypes/xci/config/user-vars +++ b/prototypes/xci/config/user-vars @@ -54,3 +54,5 @@ export OPNFV_OSA_PLAYBOOK=${OPNFV_OSA_PLAYBOOK:-"$OPENSTACK_OSA_PATH/playbooks/s export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-""} export LOG_PATH=${LOG_PATH:-${XCI_DEVEL_ROOT}/opnfv/logs} export RUN_TEMPEST=${RUN_TEMPEST:-false} +# Set this to to true to force XCI to re-create the target OS images +export CLEAN_DIB_IMAGES=${CLEAN_DIB_IMAGES:-false} diff --git a/prototypes/xci/file/install-ansible.sh b/prototypes/xci/file/install-ansible.sh index daa7f516d..67a49b397 100644 --- a/prototypes/xci/file/install-ansible.sh +++ b/prototypes/xci/file/install-ansible.sh @@ -131,6 +131,6 @@ fi PIP=$(which pip) -sudo -H -E ${PIP} install "pip>6.0" +${PIP} install --user "pip>6.0" -pip install ansible==$XCI_ANSIBLE_PIP_VERSION +${PIP} install --user --upgrade ansible==$XCI_ANSIBLE_PIP_VERSION @@ -3,7 +3,7 @@ from setuptools import setup setup( - name="opnfv", + name="releng", version="master", url="https://www.opnfv.org", ) diff --git a/utils/test/reporting/LICENSE.txt b/utils/test/reporting/LICENSE.txt index d447b560b..4d0b33c6e 100644 --- a/utils/test/reporting/LICENSE.txt +++ b/utils/test/reporting/LICENSE.txt @@ -1,5 +1,5 @@ -Creative Commons Attribution 3.0 Unported
-http://creativecommons.org/licenses/by/3.0/
+This work is licensed under a Creative Commons Attribution 4.0 International License.
+SPDX-License-Identifier: CC-BY-4.0
License
diff --git a/utils/test/reporting/README.txt b/utils/test/reporting/README.txt index 31b8d044d..049cf62ef 100644 --- a/utils/test/reporting/README.txt +++ b/utils/test/reporting/README.txt @@ -1,6 +1,6 @@ Phantom by HTML5 UP
html5up.net | @ajlkn
-Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+SPDX-License-Identifier: CC-BY-4.0
This is Phantom, a simple design built around a grid of large, colorful, semi-interactive
@@ -30,4 +30,4 @@ Credits: html5shiv.js (@afarkas @jdalton @jon_neal @rem)
Misc. Sass functions (@HugoGiraudel)
Respond.js (j.mp/respondjs)
- Skel (skel.io)
\ No newline at end of file + Skel (skel.io)
diff --git a/utils/test/reporting/api/api/handlers/testcases.py b/utils/test/reporting/api/api/handlers/testcases.py index 110ac4c26..2b9118623 100644 --- a/utils/test/reporting/api/api/handlers/testcases.py +++ b/utils/test/reporting/api/api/handlers/testcases.py @@ -20,7 +20,7 @@ class TestCases(BaseHandler): url = '{}/projects/{}/cases'.format(conf.base_url, project) cases = requests.get(url).json().get('testcases', []) - data = [t['name'] for t in cases] + data = [{t['name']: t['catalog_description']} for t in cases] self.write(json_encode(data)) diff --git a/utils/test/reporting/pages/app/images/overview.png b/utils/test/reporting/pages/app/images/overview.png Binary files differindex 14dbbff42..f1688cf37 100644 --- a/utils/test/reporting/pages/app/images/overview.png +++ b/utils/test/reporting/pages/app/images/overview.png diff --git a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js index 7082aede0..def8e7293 100644 --- a/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js +++ b/utils/test/reporting/pages/app/scripts/controllers/testvisual.controller.js @@ -10,16 +10,16 @@ angular.module('opnfvApp') .controller('testVisualController', ['$scope', '$state', '$stateParams', 'TableFactory', 'ngDialog', '$http', '$loading', function($scope, $state, $stateParams, TableFactory, ngDialog, $http, $loading) { - $scope.dovet = "59,222,156,317"; - $scope.functest = "203,163,334,365"; - $scope.yardstick = "398,161,513,384"; - $scope.vsperf = "567,163,673,350"; - $scope.stor = "686,165,789,341"; - $scope.qtip = "802,164,905,341"; - $scope.bootleneck = "917,161,1022,338"; - $scope.noPopArea1 = "30,11,1243,146"; - $scope.noPopArea2 = "1041,157,1250,561"; - $scope.noPopArea3 = "15,392,1027,561"; + $scope.dovet = "50,168,177,443"; + $scope.functest = "194,173,356,442"; + $scope.yardstick = "377,183,521,412"; + $scope.vsperf = "542,185,640,414"; + $scope.stor = "658,187,750,410"; + $scope.qtip = "769,190,852,416"; + $scope.bootleneck = "870,192,983,419"; + $scope.noPopArea1 = "26,8,1190,180"; + $scope.noPopArea2 = "1018,193,1190,590"; + $scope.noPopArea3 = "37,455,1003,584"; init(); $scope.showSelectValue = 0; @@ -51,20 +51,41 @@ angular.module('opnfvApp') $http.get(url, config).then(function(response) { if (response.status == 200) { $scope.tableData = response.data; + + $scope.tableData = constructObjectArray($scope.tableData); + console.log($scope.tableData); $loading.finish('Key'); + } }) } + //construct key value for tableData + function constructObjectArray(array) { + var templateArray = []; + for (var i = 0; i < array.length; i++) { + var key = Object.keys(array[i])[0]; + var value = array[i][key]; + var temp = { + 'key': key, + 'value': value + }; + templateArray.push(temp); + + } + + return templateArray; + } + function getDetail(casename) { TableFactory.getProjectTestCaseDetail().get({ 'project': $scope.modalName, 'testcase': casename }).$promise.then(function(response) { if (response != null) { - $scope.project_name_modal = response.project_name; + $scope.name_modal = response.name; $scope.description_modal = response.description; openTestDetail(); } @@ -108,4 +129,4 @@ angular.module('opnfvApp') } - ]);
\ No newline at end of file + ]); diff --git a/utils/test/reporting/pages/app/styles/custome.css b/utils/test/reporting/pages/app/styles/custome.css index 7ab869b56..8e567ca6e 100644 --- a/utils/test/reporting/pages/app/styles/custome.css +++ b/utils/test/reporting/pages/app/styles/custome.css @@ -71,6 +71,7 @@ html { border-radius: 5px 5px 5px 5px; background-color: #f3f3f4; opacity: 0.9; + width: 200px; } .ngdialog.ngdialog.ngdialog-theme-default .ngdialog-content { diff --git a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html index 9d146ba93..74eb56eba 100644 --- a/utils/test/reporting/pages/app/views/commons/testCaseVisual.html +++ b/utils/test/reporting/pages/app/views/commons/testCaseVisual.html @@ -4,7 +4,7 @@ <div class="row"> - <div class="row border-bottom white-bg dashboard-header" style="border-radius: 5px 5px 5px 5px "> + <div class="row border-bottom white-bg dashboard-header" style="border-radius: 5px 5px 5px 5px;width:90%;margin-left:30px; "> <h3>OPNFV Test ecosystem <small> *mouse over display test case list</small> @@ -70,7 +70,7 @@ </div> - <div id="popup" class="popup" style="width: 20%;height: 35%" dw-loading="Key"> + <div id="popup" class="popup" style="width: 40%;height: 35%" dw-loading="Key"> <div ng-show="tableData.length==0"> <center> @@ -90,7 +90,8 @@ <tbody> <tr dir-paginate="data in tableData | itemsPerPage: 8 track by $index "> - <td><a ng-click="getDetail(data)"> {{data}}</a></td> + <td ng-if="data.value!=null"><a ng-click="getDetail(data.key)"> {{data.value}}</a></td> + <td ng-if="data.value==null"><a ng-click="getDetail(data.key)"> null</a></td> <tr> </tbody> diff --git a/utils/test/reporting/pages/app/views/modal/testcasedetail.html b/utils/test/reporting/pages/app/views/modal/testcasedetail.html index 8918b3f74..db6f71295 100644 --- a/utils/test/reporting/pages/app/views/modal/testcasedetail.html +++ b/utils/test/reporting/pages/app/views/modal/testcasedetail.html @@ -2,6 +2,6 @@ <div class="hr-line-dashed"></div> -<strong> name</strong>: {{project_name_modal}}<br> +<strong> name</strong>: {{name_modal}}<br> -<strong>description</strong>: {{description_modal}}<br>
\ No newline at end of file +<strong>description</strong>: {{description_modal}}<br> diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/OpenStack_Project_Refstack_mascot_90x90.png b/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/OpenStack_Project_Refstack_mascot_90x90.png Binary files differdeleted file mode 100755 index 4695090dc..000000000 --- a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/OpenStack_Project_Refstack_mascot_90x90.png +++ /dev/null diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/openstack-logo.png b/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/openstack-logo.png Binary files differdeleted file mode 100644 index 826bf2e5d..000000000 --- a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/openstack-logo.png +++ /dev/null diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/refstack-logo.png b/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/refstack-logo.png Binary files differdeleted file mode 100755 index fc45f3ee0..000000000 --- a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/refstack-logo.png +++ /dev/null diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/testapi-logo.png b/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/testapi-logo.png Binary files differnew file mode 100644 index 000000000..ff78eb1ee --- /dev/null +++ b/utils/test/testapi/3rd_party/static/testapi-ui/assets/img/testapi-logo.png diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/results.html b/utils/test/testapi/3rd_party/static/testapi-ui/components/results/results.html index 2a43cd1e2..3056e1dbe 100644 --- a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/results.html +++ b/utils/test/testapi/3rd_party/static/testapi-ui/components/results/results.html @@ -43,184 +43,36 @@ <div cg-busy="{promise:ctrl.resultsRequest,message:'Loading'}"></div> <div ng-show="ctrl.data" class="results-table"> - <table ng-show="ctrl.data" class="table table-striped table-hover"> + <table ng-data="ctrl.data.result" ng-show="ctrl.data" class="table table-striped table-hover"> <thead> <tr> - <th ng-if="ctrl.isUserResults"></th> - <th>Upload Date</th> - <th>Test Run ID</th> - <th ng-if="ctrl.isUserResults">Vendor</th> - <th ng-if="ctrl.isUserResults">Product (version)</th> - <th ng-if="ctrl.isUserResults">Target Program</th> - <th ng-if="ctrl.isUserResults">Guideline</th> - <th ng-if="ctrl.isUserResults">Verified</th> - <th ng-if="ctrl.isUserResults">Shared</th> + <th>ID</th> + <th>Pod</th> + <th>Project</th> + <th>Test Case</th> + <th>Installer</th> + <th>Version</th> + <th>Scenario</th> + <th>Criteria</th> + <th>Start Date</th> + <th>Stop Date</th> </tr> </thead> <tbody> <tr ng-repeat-start="(index, result) in ctrl.data.results"> - <td ng-if="ctrl.isUserResults"> - <a ng-if="!result.expanded" - class="glyphicon glyphicon-plus" - ng-click="result.expanded = true"> - </a> - <a ng-if="result.expanded" - class="glyphicon glyphicon-minus" - ng-click="result.expanded = false"> - </a> - </td> - <td>{{result.created_at}}</td> - <td><a ui-sref="resultsDetail({testID: result.id})"> - {{result.id.slice(0, 8)}}...{{result.id.slice(-8)}} - </a> - </td> - <td ng-if="ctrl.isUserResults"> - {{ctrl.vendors[result.product_version.product_info.organization_id].name || '-'}} - </td> - <td ng-if="ctrl.isUserResults">{{result.product_version.product_info.name || '-'}} - <span ng-if="result.product_version.version"> - ({{result.product_version.version}}) - </span> - </td> - <td ng-if="ctrl.isUserResults">{{ctrl.targetMappings[result.meta.target] || '-'}}</td> - <td ng-if="ctrl.isUserResults">{{result.meta.guideline.slice(0, -5) || '-'}}</td> - <td ng-if="ctrl.isUserResults"> - <span ng-if="result.verification_status" class="glyphicon glyphicon-ok"></span> - <span ng-if="!result.verification_status">-</span> - - </td> - <td ng-if="ctrl.isUserResults"> - <span ng-show="result.meta.shared" class="glyphicon glyphicon-share"></span> - </td> + <td>{{ result._id }}</td> + <td>{{ result.pod_name }}</td> + <td>{{ result.project_name }}</td> + <td>{{ result.case_name }}</td> + <td>{{ result.installer }}</td> + <td>{{ result.version }}</td> + <td>{{ result.scenario }}</td> + <td>{{ result.criteria }}</td> + <td>{{ result.start_date }}</td> + <td>{{ result.stop_date }}</td> </tr> - <tr ng-if="result.expanded" ng-repeat-end> - <td></td> - <td colspan="3"> - <strong>Publicly Shared:</strong> - <span ng-if="result.meta.shared == 'true' && !result.sharedEdit">Yes</span> - <span ng-if="!result.meta.shared && !result.sharedEdit"> - <em>No</em> - </span> - <select ng-if="result.sharedEdit" - ng-model="result.meta.shared" - class="form-inline"> - <option value="true">Yes</option> - <option value="">No</option> - </select> - <a ng-if="!result.sharedEdit" - ng-click="result.sharedEdit = true" - title="Edit" - class="glyphicon glyphicon-pencil"></a> - <a ng-if="result.sharedEdit" - ng-click="ctrl.associateMeta(index,'shared',result.meta.shared)" - title="Save" - class="glyphicon glyphicon-floppy-disk"></a> - <br /> - - <strong>Associated Guideline:</strong> - <span ng-if="!result.meta.guideline && !result.guidelineEdit"> - <em>None</em> - </span> - <span ng-if="result.meta.guideline && !result.guidelineEdit"> - {{result.meta.guideline.slice(0, -5)}} - </span> - <select ng-if="result.guidelineEdit" - ng-model="result.meta.guideline" - ng-options="o as o.slice(0, -5) for o in ctrl.versionList" - class="form-inline"> - <option value="">None</option> - </select> - <a ng-if="!result.guidelineEdit" - ng-click="ctrl.getVersionList();result.guidelineEdit = true" - title="Edit" - class="glyphicon glyphicon-pencil"></a> - <a ng-if="result.guidelineEdit" - ng-click="ctrl.associateMeta(index, 'guideline', result.meta.guideline)" - title="Save" - class="glyphicon glyphicon-floppy-disk"> - </a> - <br /> - - <strong>Associated Target Program:</strong> - <span ng-if="!result.meta.target && !result.targetEdit"> - <em>None</em> - </span> - <span ng-if="result.meta.target && !result.targetEdit"> - {{ctrl.targetMappings[result.meta.target]}}</span> - <select ng-if="result.targetEdit" - ng-model="result.meta.target" - class="form-inline"> - <option value="">None</option> - <option value="platform">OpenStack Powered Platform</option> - <option value="compute">OpenStack Powered Compute</option> - <option value="object">OpenStack Powered Object Storage</option> - </select> - <a ng-if="!result.targetEdit" - ng-click="result.targetEdit = true;" - title="Edit" - class="glyphicon glyphicon-pencil"> - </a> - <a ng-if="result.targetEdit" - ng-click="ctrl.associateMeta(index, 'target', result.meta.target)" - title="Save" - class="glyphicon glyphicon-floppy-disk"> - </a> - <br /> - - <strong>Associated Product:</strong> - <span ng-if="!result.product_version && !result.productEdit"> - <em>None</em> - </span> - <span ng-if="result.product_version && !result.productEdit"> - <span ng-if="ctrl.products[result.product_version.product_info.id].product_type == 0"> - <a ui-sref="distro({id: result.product_version.product_info.id})"> - {{ctrl.products[result.product_version.product_info.id].name}} - <small ng-if="result.product_version.version"> - ({{result.product_version.version}}) - </small> - </a> - </span> - <span ng-if="ctrl.products[result.product_version.product_info.id].product_type != 0"> - <a ui-sref="cloud({id: result.product_version.product_info.id})"> - {{ctrl.products[result.product_version.product_info.id].name}} - <small ng-if="result.product_version.version"> - ({{result.product_version.version}}) - </small> - </a> - </span> - </span> - - <select ng-if="result.productEdit" - ng-options="product as product.name for product in ctrl.products | arrayConverter | orderBy: 'name' track by product.id" - ng-model="result.selectedProduct" - ng-change="ctrl.getProductVersions(result)"> - <option value="">-- No Product --</option> - </select> - - <span ng-if="result.productVersions.length && result.productEdit"> - <span class="glyphicon glyphicon-arrow-right" style="padding-right:3px;color:#303030;"></span> - Version: - <select ng-options="version as version.version for version in result.productVersions | orderBy: 'version' track by version.id" - ng-model="result.selectedVersion"> - </select> - - </span> - <a ng-if="!result.productEdit" - ng-click="ctrl.prepVersionEdit(result)" - title="Edit" - class="glyphicon glyphicon-pencil"> - </a> - <a ng-if="result.productEdit" - ng-click="ctrl.associateProductVersion(result)" - confirm="Once you associate this test to this product, ownership - will be transferred to the product's vendor admins. - Continue?" - title="Save" - class="glyphicon glyphicon-floppy-disk"> - </a> - <br /> - </td> + <tr ng-repeat-end=> </tr> </tbody> </table> diff --git a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js b/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js index 2b0338c87..39ace00eb 100644 --- a/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js +++ b/utils/test/testapi/3rd_party/static/testapi-ui/components/results/resultsController.js @@ -38,7 +38,6 @@ ctrl.associateMeta = associateMeta; ctrl.getVersionList = getVersionList; ctrl.getUserProducts = getUserProducts; - ctrl.getVendors = getVendors; ctrl.associateProductVersion = associateProductVersion; ctrl.getProductVersions = getProductVersions; ctrl.prepVersionEdit = prepVersionEdit; @@ -100,8 +99,6 @@ ctrl.update(); } - ctrl.getVendors(); - /** * This will contact the TestAPI API to get a listing of test run * results. @@ -126,9 +123,8 @@ ctrl.resultsRequest = $http.get(content_url).success(function (data) { ctrl.data = data; - ctrl.totalItems = ctrl.data.pagination.total_pages * - ctrl.itemsPerPage; - ctrl.currentPage = ctrl.data.pagination.current_page; + ctrl.totalItems = 20 // ctrl.data.pagination.total_pages * ctrl.itemsPerPage; + ctrl.currentPage = 1 // ctrl.data.pagination.current_page; }).error(function (error) { ctrl.data = null; ctrl.totalItems = 0; @@ -248,27 +244,6 @@ } /** - * This will contact the TestAPI API to get a listing of - * vendors. - */ - function getVendors() { - var contentUrl = testapiApiUrl + '/vendors'; - ctrl.vendorsRequest = - $http.get(contentUrl).success(function (data) { - ctrl.vendors = {}; - data.vendors.forEach(function(vendor) { - ctrl.vendors[vendor.id] = vendor; - }); - }).error(function (error) { - ctrl.vendors = null; - ctrl.showError = true; - ctrl.error = - 'Error retrieving vendor listing from server: ' + - angular.toJson(error); - }); - } - - /** * Send a PUT request to the API server to associate a product with * a test result. */ diff --git a/utils/test/testapi/opnfv_testapi/resources/result_handlers.py b/utils/test/testapi/opnfv_testapi/resources/result_handlers.py index 214706f5f..b84d1e3c2 100644 --- a/utils/test/testapi/opnfv_testapi/resources/result_handlers.py +++ b/utils/test/testapi/opnfv_testapi/resources/result_handlers.py @@ -47,7 +47,7 @@ class GenericResultHandler(handlers.GenericApiHandler): query['start_date'] = obj elif k == 'trust_indicator': query[k + '.current'] = float(v) - elif k != 'last': + elif k != 'last' and k != 'page': query[k] = v return query @@ -126,6 +126,10 @@ class ResultsCLHandler(GenericResultHandler): if last is not None: last = self.get_int('last', last) + page = self.get_query_argument('page', 0) + if page: + last = 20 + self._list(query=self.set_query(), sort=[('start_date', -1)], last=last) |