diff options
Diffstat (limited to 'jjb')
28 files changed, 372 insertions, 142 deletions
diff --git a/jjb/barometer/barometer-upload-artifact.sh b/jjb/barometer/barometer-upload-artifact.sh index 996de4808..817cc5770 100644 --- a/jjb/barometer/barometer-upload-artifact.sh +++ b/jjb/barometer/barometer-upload-artifact.sh @@ -17,12 +17,12 @@ echo "Uploading the barometer RPMs to artifacts.opnfv.org" echo "---------------------------------------------------" echo -gsutil -m cp -r $RPM_DIR/* $OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1 +gsutil -m cp -r $RPM_DIR/* gs://$OPNFV_ARTIFACT_URL > $WORKSPACE/gsutil.log 2>&1 # Check if the RPMs were pushed -gsutil ls $OPNFV_ARTIFACT_URL > /dev/null 2>&1 +gsutil ls gs://$OPNFV_ARTIFACT_URL > /dev/null 2>&1 if [[ $? -ne 0 ]]; then - echo "Problem while uploading barometer RPMs to $OPNFV_ARTIFACT_URL!" + echo "Problem while uploading barometer RPMs to gs://$OPNFV_ARTIFACT_URL!" echo "Check log $WORKSPACE/gsutil.log on the appropriate build server" exit 1 fi @@ -31,6 +31,12 @@ gsutil -m setmeta \ -h "Cache-Control:private, max-age=0, no-transform" \ gs://$OPNFV_ARTIFACT_URL/*.rpm > /dev/null 2>&1 +gsutil -m setmeta \ + -h "Content-Type:text/html" \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://$GS_URL/latest.properties \ + gs://$OPNFV_ARTIFACT_URL/opnfv.properties > /dev/null 2>&1 + echo echo "--------------------------------------------------------" echo "Done!" diff --git a/jjb/barometer/barometer.yml b/jjb/barometer/barometer.yml index c8fb9e25b..2d3e972f8 100644 --- a/jjb/barometer/barometer.yml +++ b/jjb/barometer/barometer.yml @@ -115,7 +115,6 @@ - shell: | pwd cd src - ./install_build_deps.sh make clobber make @@ -135,6 +134,8 @@ - project-parameter: project: '{project}' branch: '{branch}' + - barometer-project-parameter: + gs-pathname: '{gs-pathname}' - 'opnfv-build-centos-defaults' scm: diff --git a/jjb/ci_gate_security/anteater-security-audit.sh b/jjb/ci_gate_security/anteater-security-audit.sh index 2b5c26a5a..9bd3cc34f 100644 --- a/jjb/ci_gate_security/anteater-security-audit.sh +++ b/jjb/ci_gate_security/anteater-security-audit.sh @@ -16,7 +16,7 @@ docker pull opnfv/releng-anteater echo "--------------------------------------------------------" cmd="docker run -i $envs $vols --rm opnfv/releng-anteater \ -anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset" +/home/opnfv/venv/bin/anteater --project $PROJECT --patchset /home/opnfv/anteater/$PROJECT/patchset" echo "Running docker container" echo "$cmd" $cmd > $WORKSPACE/securityaudit.log 2>&1 diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index 719035214..e2f6ceb7b 100644 --- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml @@ -77,7 +77,7 @@ comment-contains-value: 'reverify' projects: - project-compare-type: 'REG_EXP' - project-pattern: 'sandbox|releng' + project-pattern: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|cooper|functest|octopus|pharos|releng|sandbox' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' @@ -115,3 +115,4 @@ !include-raw: - ./anteater-clone-all-repos.sh - ./anteater-security-audit-weekly.sh + diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index f4f49b666..ddd90b6e4 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -163,11 +163,55 @@ unstable-threshold: 'FAILURE' # dovetail only master by now, not sync with A/B/C branches # here the stream means the SUT stream, dovetail stream is defined in its own job - # only run on os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha scenario + # only run on os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha scenario + # run against SUT master branch, dovetail docker image with latest tag + # run against SUT danube branch, dovetail docker image with latest tag(odd days)and cvp.X.X.X tag(even days) - conditional-step: - condition-kind: regex-match - regex: os-(nosdn|odl_l2)-(nofeature|bgpvpn)-ha - label: '{scenario}' + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: danube + label: '{stream}' + - condition-kind: regex-match + regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + label: '{scenario}' + - condition-kind: day-of-week + day-selector: select-days + days: + MON: true + WED: true + FRI: true + SUN: true + use-build-time: true + steps: + - trigger-builds: + - project: 'dovetail-compass-{pod}-proposed_tests-{stream}' + current-parameters: false + predefined-parameters: | + DOCKER_TAG=latest + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: danube + label: '{stream}' + - condition-kind: regex-match + regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + label: '{scenario}' + - condition-kind: day-of-week + day-selector: select-days + days: + TUES: true + THURS: true + SAT: true + use-build-time: true steps: - trigger-builds: - project: 'dovetail-compass-{pod}-proposed_tests-{stream}' @@ -180,6 +224,18 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha + label: '{scenario}' + - condition-kind: regex-match + regex: master + label: '{stream}' + steps: + - trigger-builds: + - project: 'dovetail-compass-{pod}-proposed_tests-{stream}' - job-template: name: 'compass-deploy-{pod}-daily-{stream}' @@ -267,15 +323,15 @@ - trigger: name: 'compass-os-onos-nofeature-ha-baremetal-centos-master-trigger' triggers: - - timed: '0 7 * * *' + - timed: '' - trigger: name: 'compass-os-ocl-nofeature-ha-baremetal-centos-master-trigger' triggers: - - timed: '0 11 * * *' + - timed: '' - trigger: name: 'compass-os-onos-sfc-ha-baremetal-centos-master-trigger' triggers: - - timed: '0 3 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-centos-master-trigger' triggers: @@ -292,7 +348,7 @@ - trigger: name: 'compass-os-nosdn-openo-ha-baremetal-master-trigger' triggers: - - timed: '0 3 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-nofeature-ha-baremetal-master-trigger' triggers: @@ -304,15 +360,15 @@ - trigger: name: 'compass-os-onos-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 14 * * *' + - timed: '' - trigger: name: 'compass-os-ocl-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 10 * * *' + - timed: '' - trigger: name: 'compass-os-onos-sfc-ha-baremetal-master-trigger' triggers: - - timed: '0 6 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-master-trigger' triggers: @@ -345,11 +401,11 @@ - trigger: name: 'compass-os-ocl-nofeature-ha-baremetal-danube-trigger' triggers: - - timed: '0 5 * * *' + - timed: '' - trigger: name: 'compass-os-onos-sfc-ha-baremetal-danube-trigger' triggers: - - timed: '' + - timed: '0 5 * * *' - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-danube-trigger' triggers: @@ -366,7 +422,7 @@ - trigger: name: 'compass-os-nosdn-openo-ha-virtual-master-trigger' triggers: - - timed: '0 22 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-nofeature-ha-virtual-master-trigger' triggers: @@ -378,19 +434,19 @@ - trigger: name: 'compass-os-onos-nofeature-ha-virtual-master-trigger' triggers: - - timed: '0 18 * * *' + - timed: '' - trigger: name: 'compass-os-ocl-nofeature-ha-virtual-master-trigger' triggers: - - timed: '0 16 * * *' + - timed: '' - trigger: name: 'compass-os-onos-sfc-ha-virtual-master-trigger' triggers: - - timed: '0 15 * * *' + - timed: '' - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-master-trigger' triggers: - - timed: '0 14 * * *' + - timed: '' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger' triggers: diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index e43f976b5..f016b91c7 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -29,7 +29,7 @@ os-version: 'xenial' openstack-os-version: '' - 'centos7': - disabled: false + disabled: true os-version: 'centos7' openstack-os-version: '' ##################################### @@ -157,14 +157,14 @@ condition: SUCCESSFUL projects: - name: 'functest-compass-virtual-suite-{stream}' - current-parameters: true + current-parameters: false predefined-parameters: FUNCTEST_SUITE_NAME=healthcheck node-parameters: true kill-phase-on: NEVER abort-all-job: true - name: 'functest-compass-virtual-suite-{stream}' - current-parameters: true + current-parameters: false predefined-parameters: FUNCTEST_SUITE_NAME=vping_ssh node-parameters: true diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index aac76baa4..592e54dc5 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -45,6 +45,12 @@ # NOHA scenarios - 'os-nosdn-nofeature-noha': auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # ODL_L3 scenarios + - 'os-odl_l3-nofeature-noha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # ODL_L2 scenarios + - 'os-odl_l2-nofeature-noha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' jobs: - '{project}-{scenario}-{pod}-daily-{stream}' @@ -144,7 +150,7 @@ installer: '{installer}' - string: name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' + default: 'os-nosdn-nofeature-noha' - 'daisy-project-parameter': gs-pathname: '{gs-pathname}' - string: @@ -183,6 +189,16 @@ - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' triggers: + - timed: 'H 12 * * *' +# ODL_L3 Scenarios +- trigger: + name: 'daisy-os-odl_l3-nofeature-noha-baremetal-daily-master-trigger' + triggers: + - timed: 'H 16 * * *' +# ODL_L2 Scenarios +- trigger: + name: 'daisy-os-odl_l2-nofeature-noha-baremetal-daily-master-trigger' + triggers: - timed: '' #----------------------------------------------- # Triggers for job running on daisy-virtual against master branch @@ -195,5 +211,15 @@ - trigger: name: 'daisy-os-nosdn-nofeature-noha-virtual-daily-master-trigger' triggers: - - timed: 'H 8,22 * * *' + - timed: 'H 12 * * *' +# ODL_L3 Scenarios +- trigger: + name: 'daisy-os-odl_l3-nofeature-noha-virtual-daily-master-trigger' + triggers: + - timed: 'H 16 * * *' +# ODL_L3 Scenarios +- trigger: + name: 'daisy-os-odl_l2-nofeature-noha-virtual-daily-master-trigger' + triggers: + - timed: '' diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index 0a9d43d25..57e44e314 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -20,10 +20,6 @@ branch: '{stream}' gs-pathname: '' disabled: false - - danube: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false phase: - 'build': @@ -64,7 +60,7 @@ - git-scm triggers: - - timed: '0 H/8 * * *' + - timed: '0 8 * * *' parameters: - project-parameter: @@ -165,7 +161,7 @@ description: 'Git URL to use on this Jenkins Slave' - string: name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' + default: 'os-nosdn-nofeature-noha' - '{installer}-project-parameter': gs-pathname: '{gs-pathname}' diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index eb230b59d..c5454c799 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -17,11 +17,9 @@ installer: - apex: - slave-label: 'ool-virtual1' - pod: 'ool-virtual1' + slave-label: 'doctor-apex-verify' - fuel: - slave-label: 'ool-virtual2' - pod: 'ool-virtual2' + slave-label: 'doctor-fuel-verify' #- joid: # slave-label: 'ool-virtual3' # pod: 'ool-virtual3' @@ -34,9 +32,15 @@ - verify: profiler: 'none' auto-trigger-name: 'doctor-verify' + is-python: false - profiling: profiler: 'poc' auto-trigger-name: 'experimental' + is-python: false + - python-verify: + profiler: 'none' + auto-trigger-name: 'doctor-verify' + is-python: true pod: - arm-pod2: @@ -148,7 +152,7 @@ default: 'doctor-notification' - string: name: TESTCASE_OPTIONS - default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -v $WORKSPACE:/home/opnfv/repos/doctor' + default: '-e INSPECTOR_TYPE={inspector} -e PROFILER_TYPE={profiler} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor' description: 'Addtional parameters specific to test case(s)' # functest-parameter - string: diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 682948d8b..43978f6dc 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -25,7 +25,7 @@ branch: 'stable/{stream}' dovetail-branch: master gs-pathname: '/{stream}' - docker-tag: 'latest' + docker-tag: 'cvp.0.2.0' #----------------------------------- # POD, PLATFORM, AND BRANCH MAPPING @@ -229,6 +229,10 @@ name: DOVETAIL_REPO_DIR default: "/home/opnfv/dovetail" description: "Directory where the dovetail repository is cloned" + - string: + name: SUT_BRANCH + default: '{branch}' + description: "SUT branch" scm: - git-scm diff --git a/jjb/dovetail/dovetail-cleanup.sh b/jjb/dovetail/dovetail-cleanup.sh index 0ee789a97..3ae0cbcc9 100755 --- a/jjb/dovetail/dovetail-cleanup.sh +++ b/jjb/dovetail/dovetail-cleanup.sh @@ -1,4 +1,11 @@ #!/bin/bash +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index dce7e5862..bf96fd492 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -1,4 +1,11 @@ #!/bin/bash +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## #the noun INSTALLER is used in community, here is just the example to run. #multi-platforms are supported. @@ -7,14 +14,12 @@ 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 +[ -d ${DOVETAIL_HOME} ] && sudo rm -rf ${DOVETAIL_HOME} + +mkdir -p ${DOVETAIL_HOME} DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config -sudo mkdir -p ${DOVETAIL_CONFIG} +mkdir -p ${DOVETAIL_CONFIG} sshkey="" # The path of openrc.sh is defined in fetch_os_creds.sh @@ -47,7 +52,12 @@ releng_repo=${WORKSPACE}/releng git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null if [[ ${INSTALLER_TYPE} != 'joid' ]]; then - sudo /bin/bash ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + echo "SUT branch is $SUT_BRANCH" + echo "dovetail branch is $BRANCH" + BRANCH_BACKUP=$BRANCH + export BRANCH=$SUT_BRANCH + ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + export BRANCH=$BRANCH_BACKUP fi if [[ -f $OPENRC ]]; then @@ -59,6 +69,8 @@ else exit 1 fi +set +e + sudo pip install virtualenv cd ${releng_repo}/modules @@ -83,6 +95,8 @@ ${cmd} deactivate +set -e + cd ${WORKSPACE} if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then @@ -102,7 +116,8 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then 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} +echo "Download image ubuntu-16.04-server-cloudimg-amd64-disk1.img ..." +wget -q -nc http://artifacts.opnfv.org/sdnvpn/ubuntu-16.04-server-cloudimg-amd64-disk1.img -P ${DOVETAIL_CONFIG} opts="--privileged=true -id" diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 8de092d29..fdef6f483 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -203,10 +203,10 @@ installer: fuel <<: *danube # PODs for verify jobs triggered by each patch upload - - ool-virtual1: - slave-label: '{pod}' - installer: apex - <<: *master +# - ool-virtual1: +# slave-label: '{pod}' +# installer: apex +# <<: *master #-------------------------------- testsuite: diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh index 676890644..00a5f135b 100755 --- a/jjb/functest/functest-loop.sh +++ b/jjb/functest/functest-loop.sh @@ -2,7 +2,11 @@ set +e [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" -cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" +if [ "$BRANCH" == 'master' ]; then + cmd="run_tests -t all ${flags}" +else + cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}" +fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml index 7036f20c0..353423d59 100644 --- a/jjb/functest/functest-project-jobs.yml +++ b/jjb/functest/functest-project-jobs.yml @@ -9,6 +9,7 @@ jobs: - 'functest-verify-{stream}' + - 'functest-docs-upload-{stream}' stream: - master: @@ -18,7 +19,7 @@ - danube: branch: 'stable/{stream}' gs-pathname: '/{stream}' - disabled: false + disabled: true - job-template: name: 'functest-verify-{stream}' @@ -80,6 +81,41 @@ unhealthy: 40 failing: 30 +- job-template: + name: 'functest-docs-upload-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + + builders: + - functest-upload-doc-artifact + ################################ # job builders ################################ @@ -89,3 +125,10 @@ builders: - shell: | cd $WORKSPACE && tox + +- builder: + name: functest-upload-doc-artifact + builders: + - shell: | + cd $WORKSPACE && tox -edocs + wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "functest/api/_build" "docs" diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index 5d1ed28f5..9b7f1356c 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -10,7 +10,11 @@ global_ret_val=0 tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n")) for test in ${tests[@]}; do - cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test" + if [ "$BRANCH" == 'master' ]; then + cmd="run_tests -t $test" + else + cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test" + fi docker exec $container_id $cmd let global_ret_val+=$? done diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh index 558e2487d..5f936f5d9 100755 --- a/jjb/functest/set-functest-env.sh +++ b/jjb/functest/set-functest-env.sh @@ -90,7 +90,12 @@ if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then exit 1 fi -cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" +if [ "$BRANCH" == 'master' ]; then + cmd="prepare_env start" +else + cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" +fi + echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} diff --git a/jjb/global/releng-defaults.yml b/jjb/global/releng-defaults.yml index 283888603..75e00f983 100644 --- a/jjb/global/releng-defaults.yml +++ b/jjb/global/releng-defaults.yml @@ -12,3 +12,10 @@ properties: - logrotate-default + + publishers: + # Any project that has a publisher will not have this macro + # included due to the nature of JJB defaults. Projects will have + # to explicitly add this macro to their list of publishers in + # order for emails to be sent. + - email-jenkins-admins-on-failure diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index e4dfa8d80..92199d6e7 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -492,3 +492,17 @@ unhealthy: 40 failing: 30 +# The majority of the email-ext plugin options are set to the default +# for this macro so they can be managed through Jenkins' global +# settings. +- publisher: + name: email-jenkins-admins-on-failure + publishers: + - email-ext: + content-type: text + attach-build-log: true + compress-log: true + always: false + failure: true + send-to: + - recipients diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 57442225c..50859c46f 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -226,7 +226,7 @@ default: 'daisy-baremetal' - string: name: INSTALLER_IP - default: '10.20.11.2' + default: '10.20.7.3' description: 'IP of the installer' - string: name: GIT_BASE @@ -862,15 +862,13 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - parameter: - name: 'ool-defaults' + name: 'doctor-defaults' parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - ool-virtual1 - - ool-virtual2 - - ool-virtual3 + - '{default-slave}' default-slaves: - '{default-slave}' - string: @@ -882,20 +880,20 @@ default: /root/.ssh/id_rsa description: 'SSH key to be used' - parameter: - name: 'ool-virtual1-defaults' + name: 'doctor-apex-verify-defaults' parameters: - - 'ool-defaults': - default-slave: 'ool-virtual1' + - 'doctor-defaults': + default-slave: 'doctor-apex-verify' - parameter: - name: 'ool-virtual2-defaults' + name: 'doctor-fuel-verify-defaults' parameters: - - 'ool-defaults': - default-slave: 'ool-virtual2' + - 'doctor-defaults': + default-slave: 'doctor-fuel-verify' - parameter: - name: 'ool-virtual3-defaults' + name: 'doctor-joid-verify-defaults' parameters: - - 'ool-defaults': - default-slave: 'ool-virtual3' + - 'doctor-defaults': + default-slave: 'doctor-joid-verify' - parameter: name: 'multisite-virtual-defaults' parameters: diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/automate.yml index dd76538a3..73bef3e8b 100644 --- a/jjb/releng/testapi-automate.yml +++ b/jjb/releng/automate.yml @@ -1,20 +1,22 @@ - project: - name: testapi-automate + name: utils-automate stream: - master: branch: '{stream}' - gs-pathname: '' + + module: + - 'testapi' + - 'reporting' phase: - - 'docker-update' - 'docker-deploy': slave-label: 'testresults' - 'generate-doc' jobs: - - 'testapi-automate-{stream}' - - 'testapi-automate-{phase}-{stream}' - - 'testapi-verify-{stream}' + - '{module}-automate-{stream}' + - '{module}-automate-{phase}-{stream}' + - '{module}-verify-{stream}' project: 'releng' @@ -44,7 +46,7 @@ - mongodb-backup - job-template: - name: 'testapi-verify-{stream}' + name: '{module}-verify-{stream}' parameters: - project-parameter: @@ -76,10 +78,13 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/test/testapi/**' + pattern: 'utils/test/{module}/**' builders: - - run-unit-tests + - shell: | + cd ./utils/test/{module}/ + bash run_test.sh + cp *.xml $WORKSPACE publishers: - junit: @@ -101,7 +106,7 @@ failing: 30 - job-template: - name: 'testapi-automate-{stream}' + name: '{module}-automate-{stream}' project-type: multijob @@ -118,8 +123,12 @@ branch: '{branch}' - string: name: DOCKER_TAG - default: "latest" - description: "Tag name for testapi docker image" + default: 'latest' + description: 'Tag name for {module} docker image' + - string: + name: MODULE_NAME + default: '{module}' + description: "Name of the module" - 'opnfv-build-defaults' scm: @@ -146,24 +155,17 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/test/testapi/**' + pattern: 'utils/test/{module}/**' builders: - description-setter: description: "Built on $NODE_NAME" - - multijob: - name: docker-update - condition: SUCCESSFUL - projects: - - name: 'testapi-automate-docker-update-{stream}' - current-parameters: true - kill-phase-on: FAILURE - abort-all-job: true + - docker-update - multijob: name: docker-deploy condition: SUCCESSFUL projects: - - name: 'testapi-automate-docker-deploy-{stream}' + - name: '{module}-automate-docker-deploy-{stream}' current-parameters: false predefined-parameters: | GIT_BASE=$GIT_BASE @@ -175,7 +177,7 @@ name: generate-doc condition: SUCCESSFUL projects: - - name: 'testapi-automate-generate-doc-{stream}' + - name: '{module}-automate-generate-doc-{stream}' current-parameters: true kill-phase-on: FAILURE abort-all-job: true @@ -184,7 +186,7 @@ - 'email-publisher' - job-template: - name: 'testapi-automate-{phase}-{stream}' + name: '{module}-automate-{phase}-{stream}' properties: - throttle: @@ -196,10 +198,6 @@ - project-parameter: project: '{project}' branch: '{branch}' - - string: - name: DOCKER_TAG - default: "latest" - description: "Tag name for testapi docker image" wrappers: - ssh-agent-wrapper @@ -213,28 +211,16 @@ builders: - description-setter: description: "Built on $NODE_NAME" - - 'testapi-automate-{phase}-macro' + - '{module}-automate-{phase}-macro' ################################ # job builders ################################ - builder: - name: mongodb-backup - builders: - - shell: | - bash ./jjb/releng/testapi-backup-mongodb.sh - -- builder: - name: 'run-unit-tests' + name: 'docker-update' builders: - - shell: | - bash ./utils/test/testapi/run_test.sh - -- builder: - name: 'testapi-automate-docker-update-macro' - builders: - - shell: | - bash ./jjb/releng/testapi-docker-update.sh + - shell: + !include-raw: ./docker-update.sh - builder: name: 'testapi-automate-generate-doc-macro' @@ -255,10 +241,26 @@ bash ./utils/test/testapi/htmlize/push-doc-artifact.sh - builder: + name: 'reporting-automate-generate-doc-macro' + builders: + - shell: echo "To Be Done" + +- builder: name: 'testapi-automate-docker-deploy-macro' builders: - shell: | - bash ./jjb/releng/testapi-docker-deploy.sh + bash ./jjb/releng/docker-deploy.sh 'sudo docker run -dti -p 8082:8000 -e mongodb_url=mongodb://172.17.0.1:27017 -e base_url=http://testresults.opnfv.org/test opnfv/testapi' "http://testresults.opnfv.org/test/swagger/APIs" +- builder: + name: 'reporting-automate-docker-deploy-macro' + builders: + - shell: | + bash ./jjb/releng/docker-deploy.sh 'sudo docker run -itd -p 8084:8000 -e SERVER_URL=http://testresults.opnfv.org/reporting2:8084 opnfv/reporting' "http://testresults.opnfv.org/reporting2/reporting/index.html" + +- builder: + name: mongodb-backup + builders: + - shell: | + bash ./jjb/releng/testapi-backup-mongodb.sh ################################ # job publishers @@ -268,6 +270,6 @@ name: 'email-publisher' publishers: - email: - recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn + recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn morgan.richomme@orange.com notify-every-unstable-build: false send-to-individuals: true diff --git a/jjb/releng/testapi-docker-deploy.sh b/jjb/releng/docker-deploy.sh index b4e60b09a..b3b930fc4 100644 --- a/jjb/releng/testapi-docker-deploy.sh +++ b/jjb/releng/docker-deploy.sh @@ -1,10 +1,30 @@ #!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one * +# or more contributor license agreements. See the NOTICE file * +# distributed with this work for additional information * +# regarding copyright ownership. The ASF licenses this file * +# to you under the Apache License, Version 2.0 (the * +# "License"); you may not use this file except in compliance * +# with the License. You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, * +# software distributed under the License is distributed on an * +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * +# KIND, either express or implied. See the License for the * +# specific language governing permissions and limitations * +# under the License. * + +# Assigning Variables +command=$1 +url=$2 function check() { # Verify hosted sleep 5 - cmd=`curl -s --head --request GET http://testresults.opnfv.org/test/swagger/spec | grep '200 OK' > /dev/null` + cmd=`curl -s --head --request GET ${url} | grep '200 OK' > /dev/null` rc=$? echo $rc @@ -63,7 +83,7 @@ else fi echo "Running a container with the new image" -sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:latest +$command:latest if check; then echo "TestResults Hosted." @@ -71,7 +91,7 @@ else echo "TestResults Hosting Failed" if [[ $(sudo docker images | grep "opnfv/testapi" | grep "old" | awk '{print $3}') ]]; then echo "Running old Image" - sudo docker run -dti -p "8082:8000" -e "mongodb_url=mongodb://172.17.0.1:27017" -e "swagger_url=http://testresults.opnfv.org/test" opnfv/testapi:old + $command:old exit 1 fi fi diff --git a/jjb/releng/docker-update.sh b/jjb/releng/docker-update.sh new file mode 100644 index 000000000..559ac835c --- /dev/null +++ b/jjb/releng/docker-update.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one * +# or more contributor license agreements. See the NOTICE file * +# distributed with this work for additional information * +# regarding copyright ownership. The ASF licenses this file * +# to you under the Apache License, Version 2.0 (the * +# "License"); you may not use this file except in compliance * +# with the License. You may obtain a copy of the License at * +# * +# http://www.apache.org/licenses/LICENSE-2.0 * +# * +# Unless required by applicable law or agreed to in writing, * +# software distributed under the License is distributed on an * +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * +# KIND, either express or implied. See the License for the * +# specific language governing permissions and limitations * +# under the License. * + +set -o errexit +set -o nounset + +cd $WORKSPACE/utils/test/$MODULE_NAME/docker/ + +# Remove previous containers +docker ps -a | grep "opnfv/$MODULE_NAME" | awk '{ print $1 }' | xargs -r docker rm -f + +# Remove previous images +docker images | grep "opnfv/$MODULE_NAME" | awk '{ print $3 }' | xargs -r docker rmi -f + +# Start build +docker build --no-cache -t opnfv/$MODULE_NAME:$DOCKER_TAG . + +# Push Image +docker push opnfv/$MODULE_NAME:$DOCKER_TAG diff --git a/jjb/releng/testapi-docker-update.sh b/jjb/releng/testapi-docker-update.sh deleted file mode 100644 index 84f5c3217..000000000 --- a/jjb/releng/testapi-docker-update.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -o errexit -set -o nounset - -cd $WORKSPACE/utils/test/testapi/docker/ - -# Remove previous containers -docker ps -a | grep "opnfv/testapi" | awk '{ print $1 }' | xargs -r docker rm -f - -# Remove previous images -docker images | grep "opnfv/testapi" | awk '{ print $3 }' | xargs -r docker rmi -f - -# Start build -docker build --no-cache -t opnfv/testapi:$DOCKER_TAG . - -# Push Image -docker push opnfv/testapi:$DOCKER_TAG diff --git a/jjb/storperf/storperf.yml b/jjb/storperf/storperf.yml index be53b27b4..13186a1ad 100644 --- a/jjb/storperf/storperf.yml +++ b/jjb/storperf/storperf.yml @@ -201,7 +201,7 @@ - git-scm triggers: - - timed: '0 18 * * *' + - timed: '0 22 * * *' builders: - shell: | diff --git a/jjb/xci/bifrost-periodic-jobs.yml b/jjb/xci/bifrost-periodic-jobs.yml index 3e9ff678e..9773cfd9e 100644 --- a/jjb/xci/bifrost-periodic-jobs.yml +++ b/jjb/xci/bifrost-periodic-jobs.yml @@ -135,7 +135,7 @@ # trigger is disabled until we know which jobs we will have # and adjust stuff accordingly triggers: - - timed: '#@midnight' + - timed: '' # '@midnight' builders: - description-setter: diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml index 56a4b18b4..722b077ac 100644 --- a/jjb/xci/osa-periodic-jobs.yml +++ b/jjb/xci/osa-periodic-jobs.yml @@ -132,7 +132,7 @@ # trigger is disabled until we know which jobs we will have # and adjust stuff accordingly triggers: - - timed: '#@midnight' + - timed: '' # '@midnight' builders: - description-setter: diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index 973f83ad5..1c2abad3f 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -31,7 +31,8 @@ fi opts="--privileged=true --rm" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \ - -e YARDSTICK_BRANCH=${BRANCH} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" + -e YARDSTICK_BRANCH=${BRANCH} -e BRANCH=${BRANCH} \ + -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" # Pull the image with correct tag echo "Yardstick: Pulling image opnfv/yardstick:${DOCKER_TAG}" |