diff options
Diffstat (limited to 'jjb')
37 files changed, 898 insertions, 452 deletions
diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 1aa9df619..0202ef0e7 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -122,28 +122,42 @@ DEPLOY_SCENARIO={scenario} same-node: true block: true - - trigger-builds: - - project: 'functest-{installer}-{pod}-arm-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-{installer}-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - 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: not + condition-operand: + condition-kind: regex-match + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'functest-{installer}-{pod}-arm-daily-{stream}' + current-parameters: false + predefined-parameters: + 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: not + condition-operand: + condition-kind: regex-match + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'yardstick-{installer}-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' # 1.dovetail only master, based on D release # 2.here the stream means the SUT stream, # dovetail stream is defined in its own job @@ -152,9 +166,14 @@ # only to debug the dovetail tool bugs with arm pods # 5.only run against scenario os-(nosdn|odl)-(nofeature-bgpvpn)-ha - conditional-step: - condition-kind: regex-match - regex: os-(nosdn|odl)-(nofeature|bgpvpn)-ha - label: '{scenario}' + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: os-(nosdn|odl)-(nofeature|bgpvpn)-ha + label: '{scenario}' + - condition-kind: regex-match + regex: 'danube' + label: '{stream}' steps: - trigger-builds: - project: 'dovetail-{installer}-{pod}-proposed_tests-master' @@ -168,15 +187,24 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' # Armband uses Fuel's log collection project job, no need to duplicate - - trigger-builds: - - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}' - current-parameters: false - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: not + condition-operand: + condition-kind: regex-match + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'fuel-collect-logs-{deploy-type}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{installer}-deploy-{pod}-daily-{stream}' diff --git a/jjb/armband/armband-verify-jobs.yml b/jjb/armband/armband-verify-jobs.yml index 04ade724a..1ebb7df5c 100644 --- a/jjb/armband/armband-verify-jobs.yml +++ b/jjb/armband/armband-verify-jobs.yml @@ -55,6 +55,7 @@ use-build-blocker: true blocking-jobs: - 'fuel-os-.*?-virtual-daily-.*' + - 'armband-verify-.*' block-level: 'NODE' scm: diff --git a/jjb/bottlenecks/bottlenecks-run-suite.sh b/jjb/bottlenecks/bottlenecks-run-suite.sh index 0e325e115..ebd905e98 100644 --- a/jjb/bottlenecks/bottlenecks-run-suite.sh +++ b/jjb/bottlenecks/bottlenecks-run-suite.sh @@ -32,22 +32,18 @@ if [[ $SUITE_NAME == *posca* ]]; then # Preparing OpenStack RC and Cacert files echo "BOTTLENECKS INFO: fetching os credentials from $INSTALLER_TYPE" if [[ $INSTALLER_TYPE == 'compass' ]]; then - if [[ ${BRANCH} == 'master' ]]; then - ${RELENG_REPO}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} -o ${OS_CACERT} >${redirect} - if [[ -f ${OS_CACERT} ]]; then - echo "BOTTLENECKS INFO: successfully fetching os_cacert for openstack: ${OS_CACERT}" - else - echo "BOTTLENECKS ERROR: couldn't find os_cacert file: ${OS_CACERT}, please check if the it's been properly provided." - exit 1 - fi + ${RELENG_REPO}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} -o ${OS_CACERT} >${redirect} + if [[ -f ${OS_CACERT} ]]; then + echo "BOTTLENECKS INFO: successfully fetching os_cacert for openstack: ${OS_CACERT}" else - ${RELENG_REPO}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + echo "BOTTLENECKS ERROR: couldn't find os_cacert file: ${OS_CACERT}, please check if the it's been properly provided." + exit 1 fi fi if [[ -f ${OPENRC} ]]; then echo "BOTTLENECKS INFO: openstack credentials path is ${OPENRC}" - if [[ $INSTALLER_TYPE == 'compass' && ${BRANCH} == 'master' ]]; then + if [[ $INSTALLER_TYPE == 'compass' ]]; then echo "BOTTLENECKS INFO: writing ${OS_CACERT} to ${OPENRC}" echo "export OS_CACERT=${OS_CACERT}" >> ${OPENRC} fi diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 5100787d7..4adfc2a3f 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -768,7 +768,7 @@ - trigger: name: 'compass-k8-nosdn-nofeature-ha-virtual-master-trigger' triggers: - - timed: '0 12 * * *' + - timed: '5 2 * * *' - trigger: name: 'compass-os-odl-sfc-ha-virtual-master-trigger' triggers: @@ -852,7 +852,7 @@ - trigger: name: 'compass-k8-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '0 13 * * *' + - timed: '5 1 * * *' # ------------------- # noha-virtual-euphrates diff --git a/jjb/compass4nfv/compass-dovetail-jobs.yml b/jjb/compass4nfv/compass-dovetail-jobs.yml index f0e1c2d3f..c09086348 100644 --- a/jjb/compass4nfv/compass-dovetail-jobs.yml +++ b/jjb/compass4nfv/compass-dovetail-jobs.yml @@ -184,9 +184,9 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-weekly-danube-trigger' triggers: - - timed: 'H H * * 0' + - timed: '' # 'H H * * 0' - trigger: name: 'dovetail-weekly-trigger' triggers: - - timed: 'H H * * 0' + - timed: '' # 'H H * * 0' diff --git a/jjb/container4nfv/container4nfv-project.yml b/jjb/container4nfv/container4nfv-project.yml index 70a3cc5cf..9e2d313c8 100644 --- a/jjb/container4nfv/container4nfv-project.yml +++ b/jjb/container4nfv/container4nfv-project.yml @@ -10,6 +10,7 @@ jobs: - 'container4nfv-verify-{stream}' + - 'container4nfv-daily-{stream}' stream: - master: @@ -30,6 +31,12 @@ - project-parameter: project: '{project}' branch: '{branch}' + # yamllint disable rule:line-length + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." + # yamllint enable rule:line-length - 'opnfv-build-ubuntu-defaults' scm: @@ -61,4 +68,47 @@ builders: - shell: | - echo "Nothing to verify!" + cd $WORKSPACE/ci + ./build.sh + + +- job-template: + name: 'container4nfv-daily-{stream}' + + project-type: freestyle + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + # yamllint disable rule:line-length + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." + # yamllint enable rule:line-length + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - huawei-virtual6 + default-slaves: + - huawei-virtual6 + + scm: + - git-scm + + triggers: + - timed: '@midnight' + + builders: + - shell: | + cd $WORKSPACE/ci + ./deploy.sh diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index b3c37b88f..00024e801 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -94,6 +94,7 @@ use-build-blocker: true blocking-jobs: - 'daisy-daily-.*' + - 'daisy-kolla-build-.*' block-level: 'NODE' wrappers: @@ -137,6 +138,27 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: 'baremetal' + label: '{pod}' + - condition-kind: regex-match + regex: 'master' + label: '{stream}' + steps: + - trigger-builds: + - project: 'yardstick-daisy-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - job-template: name: '{project}-deploy-{pod}-daily-{stream}' @@ -156,6 +178,7 @@ use-build-blocker: true blocking-jobs: - 'daisy.*-deploy-({pod})?-daily-.*' + - 'daisy-kolla-build-.*' block-level: 'NODE' parameters: @@ -200,7 +223,7 @@ - trigger: name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 18 * * *' # Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index b6e9526e3..006153f6f 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -37,6 +37,72 @@ jobs: - '{installer}-daily-{stream}' - '{installer}-{phase}-daily-{stream}' + - '{installer}-kolla-build-{stream}' + +############################# +# docker build job templates +############################# +- job-template: + name: '{installer}-kolla-build-{stream}' + disabled: false + concurrent: true + + properties: + - logrotate-default + - throttle: + enabled: true + max-total: 4 + option: 'project' + - build-blocker: + use-build-blocker: true + # Note: Need to block all jobs which may create daisy VM. + blocking-jobs: + - '{installer}-kolla-build-.*' + - 'daisy-deploy-.*' + - 'daisy-daily-.*' + block-level: 'NODE' + + scm: + - git-scm + + triggers: + - 'daisy-kolla-build-{stream}-trigger' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'daisy-virtual-defaults' + - '{installer}-defaults' + - '{installer}-project-parameter': + gs-pathname: '{gs-pathname}' + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 720 + fail: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: + !include-raw-escape: ./daisy4nfv-build-kolla-image.sh + + publishers: + - '{installer}-recipients' + - email-jenkins-admins-on-failure + +- trigger: + name: 'daisy-kolla-build-euphrates-trigger' + triggers: + - timed: '0 0 * * 0' + +- trigger: + name: 'daisy-kolla-build-master-trigger' + triggers: + - timed: '0 12 * * 0' + ######################## # job templates @@ -60,6 +126,7 @@ use-build-blocker: true blocking-jobs: - '{installer}-daily-.*' + - '{installer}-kolla-build-.*' - 'daisy4nfv-merge-build-.*' - 'daisy4nfv-verify-build-.*' block-level: 'NODE' diff --git a/jjb/daisy4nfv/daisy4nfv-build-kolla-image.sh b/jjb/daisy4nfv/daisy4nfv-build-kolla-image.sh new file mode 100755 index 000000000..9a1e2fc20 --- /dev/null +++ b/jjb/daisy4nfv/daisy4nfv-build-kolla-image.sh @@ -0,0 +1,94 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2016 ZTE Coreporation and others. +# hu.zhijiang@zte.com.cn +# sun.jing22@zte.com.cn +# 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 +############################################################################## + + +set -o errexit +set -o nounset +set -o pipefail + +importkey () { + # clone releng repository + echo "Cloning releng repository..." + [ -d releng ] && rm -rf releng + git clone https://gerrit.opnfv.org/gerrit/releng ./releng/ &> /dev/null + #this is where we import the siging key + if [ -f ./releng/utils/gpg_import_key.sh ]; then + source ./releng/utils/gpg_import_key.sh + fi +} + +upload_image_to_opnfv () { + image=$1 + + importkey + if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then + echo "Signing Key avaliable" + SIGN_ARTIFACT="true" + fi + + if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then + gpg2 -vvv --batch --yes --no-tty \ + --default-key opnfv-helpdesk@rt.linuxfoundation.org \ + --passphrase besteffort \ + --detach-sig $image + gsutil cp $image.sig gs://$GS_URL/upstream/$image.sig + echo "Image signature upload complete!" + fi + + sha512sum -b $image > $image.sha512sum + gsutil cp $image.sha512sum gs://$GS_URL/upstream/$image.sha512sum + + echo "Uploading $INSTALLER_TYPE artifact. This could take some time..." + echo + gsutil cp $image gs://$GS_URL/upstream/$image + gsutil -m setmeta \ + -h "Cache-Control:private, max-age=0, no-transform" \ + gs://$GS_URL/upstream/$image + + # check if we uploaded the file successfully to see if things are fine + gsutil ls gs://$GS_URL/upstream/$image + if [[ $? -ne 0 ]]; then + echo "Problem while uploading artifact!" + exit 1 + fi +} + + + +echo "--------------------------------------------------------" +echo "This is diasy4nfv kolla image build job!" +echo "--------------------------------------------------------" + +# start the build +cd $WORKSPACE +rm -rf docker_build_dir +mkdir -p docker_build_dir + +# -j is for deciding which branch will be used when building, +# only for OPNFV +sudo -E ./ci/kolla-build.sh -j $JOB_NAME -w $WORKSPACE/docker_build_dir + +if [ $? -ne 0 ]; then + echo + echo "Kolla build failed!" + deploy_ret=1 +else + echo + echo "--------------------------------------------------------" + echo "Kolla build done!" +fi + +image=$(ls $WORKSPACE/docker_build_dir/kolla-build-output/kolla-image-*.tgz) +upload_image_to_opnfv $image + +echo +echo "--------------------------------------------------------" +echo "All done!" diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index 6a04c5fbc..e28f74431 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -25,6 +25,12 @@ # slave-label: 'ool-virtual3' # pod: 'ool-virtual3' + phase: + - 'build-x86_64': + slave-label: 'opnfv-build-ubuntu' + - 'build-aarch64': + slave-label: 'opnfv-build-ubuntu-arm' + inspector: - 'sample' - 'congress' @@ -37,22 +43,23 @@ auto-trigger-name: 'doctor-verify' is-python: true - pod: - - armband-baremetal: - slave-label: '{pod}' - - armband-virtual: - slave-label: '{pod}' + exclude: + - installer: 'apex' + phase: 'build-aarch64' jobs: - 'doctor-verify-{stream}' - - 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}' + - 'doctor-verify-unit-test-{stream}' - 'doctor-{task}-{installer}-{inspector}-{stream}' + - 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}' - job-template: name: 'doctor-verify-{stream}' disabled: '{obj:disabled}' + project-type: 'multijob' + parameters: - project-parameter: project: '{project}' @@ -86,38 +93,54 @@ pattern: 'doctor_tests/**' builders: - - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'doctor-build-and-unittest' + execution-type: PARALLEL + projects: + - name: 'doctor-verify-unit-test-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false - job-template: - name: 'doctor-{task}-{installer}-{inspector}-{pod}-{stream}' - - node: '{slave-label}' - + name: 'doctor-verify-unit-test-{stream}' disabled: '{obj:disabled}' - + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 60 parameters: - project-parameter: project: '{project}' branch: '{branch}' - 'opnfv-build-ubuntu-defaults' - scm: - git-scm-gerrit - - - triggers: - - '{auto-trigger-name}': - project: '{project}' - branch: '{branch}' - files: 'doctor_tests/**' - builders: - - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" + - 'doctor-verify-unit-test-builders-macro' + publishers: + - 'doctor-verify-unit-test-publishers-macro' - job-template: name: 'doctor-{task}-{installer}-{inspector}-{stream}' + disabled: '{obj:disabled}' + + project-type: 'multijob' + node: '{slave-label}' parameters: @@ -151,13 +174,17 @@ default: 'doctor-notification' - string: name: TESTCASE_OPTIONS + # yamllint disable rule:line-length default: '-e INSPECTOR_TYPE={inspector} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor' + # yamllint enable rule:line-length description: 'Addtional parameters specific to test case(s)' # functest-parameter - string: name: GS_PATHNAME default: '{gs-pathname}' + # yamllint disable rule:line-length description: "Version directory where the opnfv documents will be stored in gs repository" + # yamllint enable rule:line-length - string: name: FUNCTEST_REPO_DIR default: "/home/opnfv/repos/functest" @@ -181,7 +208,59 @@ files: 'doctor_tests/**' builders: + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'doctor-verify-installer-inspector' + execution-type: PARALLEL + projects: + - name: 'doctor-{task}-{installer}-{inspector}-build-x86_64-{stream}' + current-parameters: false + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'doctor-{task}-{installer}-{inspector}-build-aarch64-{stream}' + current-parameters: false + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}' + disabled: '{obj:disabled}' + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 30 + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + scm: + - git-scm-gerrit + builders: + - 'doctor-verify-installer-inspector-builders-macro' + publishers: + - 'doctor-verify-publishers-macro' +# ------------------------------- +# builder macros +# ------------------------------- + +- builder: + name: 'doctor-verify-unit-test-builders-macro' + builders: + - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" +- builder: + name: 'doctor-verify-installer-inspector-builders-macro' + builders: - 'clean-workspace-log' + # yamllint disable rule:line-length - shell: | # NOTE: Create symbolic link, so that we can archive file outside # of $WORKSPACE . @@ -200,14 +279,23 @@ # NOTE: checking the test result, as the previous job could return # 0 regardless the result of doctor test scenario. grep -e 'doctor test successfully' $functest_log || exit 1 + # yamllint enable rule:line-length +# ------------------------------- +# publisher macros +# ------------------------------- +- publisher: + name: 'doctor-verify-publishers-macro' publishers: - archive: artifacts: 'doctor_tests/*.log' - archive: artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log' - email-jenkins-admins-on-failure - +- publisher: + name: 'doctor-verify-unit-test-publishers-macro' + publishers: + - email-jenkins-admins-on-failure ##################################### # trigger macros diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 9fde120f8..6efe12820 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: 'cvp.0.7.0' + docker-tag: 'cvp.0.8.0' # ---------------------------------- # POD, PLATFORM, AND BRANCH MAPPING diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 92ad8e69a..5dc8a72c3 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -171,28 +171,42 @@ DEPLOY_SCENARIO={scenario} same-node: true block: true - - trigger-builds: - - project: 'functest-fuel-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - trigger-builds: - - project: 'yardstick-fuel-{pod}-daily-{stream}' - current-parameters: false - predefined-parameters: - 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: not + condition-operand: + condition-kind: regex-match + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'functest-fuel-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + same-node: true + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' + - conditional-step: + condition-kind: not + condition-operand: + condition-kind: regex-match + regex: 'danube' + label: '{stream}' + steps: + - trigger-builds: + - project: 'yardstick-fuel-{pod}-daily-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' # 1.dovetail only has master, based on D release # 2.here the stream means the SUT stream, dovetail stream is defined in its own job # 3.only debug testsuite here(refstack, ha, ipv6, bgpvpn) @@ -201,9 +215,14 @@ # 5.only run against scenario os-odl-bgpvpn-ha(regex used here, can extend to more scenarios future) # 6.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube - conditional-step: - condition-kind: regex-match - regex: os-(nosdn-nofeature|odl_l2-bgpvpn)-ha - label: '{scenario}' + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: os-(nosdn-nofeature|odl_l2-bgpvpn)-ha + label: '{scenario}' + - condition-kind: regex-match + regex: 'danube' + label: '{stream}' steps: - trigger-builds: - project: 'dovetail-fuel-{pod}-proposed_tests-master' diff --git a/jjb/fuel/fuel-verify-jobs.yml b/jjb/fuel/fuel-verify-jobs.yml index 8026c19af..006b4d809 100644 --- a/jjb/fuel/fuel-verify-jobs.yml +++ b/jjb/fuel/fuel-verify-jobs.yml @@ -55,6 +55,7 @@ use-build-blocker: true blocking-jobs: - 'fuel-os-.*?-virtual-daily-.*' + - 'fuel-verify-.*' block-level: 'NODE' scm: diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index f5f39b8ff..bd2bdf4a8 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -15,7 +15,7 @@ run_tiers() { FUNCTEST_IMAGE=opnfv/functest-${tier}:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest tier '${tier}'. CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -31,7 +31,7 @@ run_tiers() { run_test() { test_name=$1 - cmd_opt="prepare_env start && run_tests -r -t ${test_name}" + cmd_opt="prepare_env start && run_tests -t ${test_name}" [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t ${test_name}" ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo 0 > ${ret_val_file} @@ -56,7 +56,7 @@ run_test() { esac echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest test case '${test_name}'. CMD: ${cmd}" eval ${cmd} ret_value=$? diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index bddb2777b..2fc70b916 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -190,16 +190,6 @@ # <<: *master # ------------------------------- - alpine-pod: - - ericsson-virtual-pod1bl01: - slave-label: '{alpine-pod}' - installer: fuel - <<: *master - - huawei-virtual5: - slave-label: '{alpine-pod}' - installer: compass - <<: *master - testsuite: - 'suite': job-timeout: 60 @@ -210,7 +200,6 @@ jobs: - 'functest-{installer}-{pod}-{testsuite}-{stream}' - - 'functest-alpine-{installer}-{alpine-pod}-{testsuite}-{stream}' ################################ # job template @@ -263,45 +252,6 @@ description: "Built on $NODE_NAME" - 'functest-{testsuite}-builder' -- job-template: - name: 'functest-alpine-{installer}-{alpine-pod}-{testsuite}-{stream}' - - concurrent: true - - properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' - - wrappers: - - build-name: - name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO' - - timeout: - timeout: '{job-timeout}' - abort: true - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults' - - '{slave-label}-defaults' - - 'functest-{testsuite}-parameter' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' - - functest-parameter: - gs-pathname: '{gs-pathname}' - - scm: - - git-scm - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - 'functest-alpine-daily-builder' ######################## # parameter macros @@ -418,7 +368,6 @@ name: functest-arm-daily-builder builders: - 'functest-cleanup' - - 'set-functest-env' - 'functest-arm-daily' - 'functest-store-results' - 'functest-exit' @@ -427,16 +376,6 @@ name: functest-suite-builder builders: - 'functest-cleanup' - - 'set-functest-env-alpine' - - 'functest-suite' - - 'functest-store-results' - - 'functest-exit' - -- builder: - name: functest-alpine-daily-builder - builders: - - 'functest-cleanup' - - 'set-functest-env-alpine' - 'functest-daily' - 'functest-store-results' - 'functest-exit' @@ -455,37 +394,13 @@ - builder: name: functest-arm-daily builders: - - shell: - !include-raw: ./functest-loop.sh - -- builder: - name: functest-suite - builders: - # yamllint disable rule:indentation - - shell: - !include-raw: - - ./functest-alpine.sh - -# yamllint enable rule:indentation -- builder: - name: set-functest-env - builders: # yamllint disable rule:indentation - shell: !include-raw: - ./functest-env-presetup.sh - ../../utils/fetch_os_creds.sh - ./set-functest-env.sh - -# yamllint enable rule:indentation -- builder: - name: set-functest-env-alpine - builders: - # yamllint disable rule:indentation - - shell: - !include-raw: - - ./functest-env-presetup.sh - - ../../utils/fetch_os_creds.sh + - ./functest-loop.sh # yamllint enable rule:indentation - builder: diff --git a/jjb/global/installer-params.yml b/jjb/global/installer-params.yml index 454cee841..916db808d 100644 --- a/jjb/global/installer-params.yml +++ b/jjb/global/installer-params.yml @@ -58,6 +58,10 @@ name: GS_URL default: '$GS_BASE{gs-pathname}' description: "URL to Google Storage." + - string: + name: CI_DEBUG + default: 'false' + description: "Show debug output information" - parameter: name: 'joid-defaults' @@ -114,6 +118,10 @@ name: BRIDGE default: 'br7' description: 'pxe bridge for booting of Daisy master' + - string: + name: EXTERNAL_NETWORK + default: 'admin_external' + description: 'external network for test' - parameter: name: 'infra-defaults' diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index a5d0fee05..55433d043 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -136,6 +136,20 @@ pattern: '{files}' - trigger: + name: gerrit-trigger-tag-created + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - ref-updated + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: 'refs/tags/**' + +- trigger: name: 'experimental' triggers: - gerrit: @@ -182,17 +196,6 @@ sudo chown -R $USER:$USER $WORKSPACE || exit 1 - builder: - name: build-html-and-pdf-docs-output - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - git clone ssh://gerrit.opnfv.org:29418/opnfvdocs docs_build/_opnfvdocs - GERRIT_COMMENT=gerrit_comment.txt ./docs_build/_opnfvdocs/scripts/docs-build.sh - -- builder: name: upload-under-review-docs-to-opnfv-artifacts builders: - shell: | @@ -203,7 +206,7 @@ export PATH=$PATH:/usr/local/bin/ [[ $GERRIT_CHANGE_NUMBER =~ .+ ]] - [[ -d docs_output ]] || exit 0 + [[ -d docs/_build/ ]] || exit 0 echo echo "###########################" @@ -216,7 +219,7 @@ local_path="upload/$GERRIT_CHANGE_NUMBER" mkdir -p upload - mv docs_output "$local_path" + mv docs/_build/html/ "$local_path" gsutil -m cp -r "$local_path" "gs://$gs_base" gsutil -m setmeta \ @@ -228,46 +231,6 @@ find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt -- builder: - name: upload-generated-docs-to-opnfv-artifacts - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - set -o xtrace - export PATH=$PATH:/usr/local/bin/ - - [[ -d docs_output ]] || exit 0 - - echo - echo "########################" - echo "UPLOADING GENERATED DOCS" - echo "########################" - echo - - echo "gs_path="$GS_URL/docs"" - echo "local_path="upload/docs"" - - gs_path="$GS_URL/docs" - local_path="upload/docs" - - mkdir -p upload - mv docs_output "$local_path" - ls "$local_path" - - echo "gsutil -m cp -r "$local_path"/* "gs://$gs_path"" - gsutil -m cp -r "$local_path"/* "gs://$gs_path" - - gsutil -m setmeta \ - -h "Content-Type:text/html" \ - -h "Cache-Control:private, max-age=0, no-transform" \ - "gs://$gs_path"/**.html > /dev/null 2>&1 - - echo "Document link(s):" >> gerrit_comment.txt - find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \ - sed -e "s|^$local_path| http://$gs_path|" >> gerrit_comment.txt - # To take advantage of this macro, have your build write # out the file 'gerrit_comment.txt' with information to post # back to gerrit and include this macro in the list of builders. @@ -417,19 +380,10 @@ - builder: name: upload-review-docs builders: - - build-html-and-pdf-docs-output - upload-under-review-docs-to-opnfv-artifacts - report-build-result-to-gerrit - builder: - name: upload-merged-docs - builders: - - build-html-and-pdf-docs-output - - upload-generated-docs-to-opnfv-artifacts - - report-build-result-to-gerrit - - remove-old-docs-from-opnfv-artifacts - -- builder: name: check-bash-syntax builders: - shell: "find . -name '*.sh' | xargs bash -n" @@ -450,18 +404,19 @@ # generate and upload lint log echo "Running yaml code on $PROJECT ..." + # Get list of yaml files + YAML_FILES=$(git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 | egrep "ya?ml$") + # Ensure we start with a clean environment rm -f yaml-violation.log lint.log - # Get number of yaml violations. If none, this will be an - # empty string: "" - find . \ - -type f -name "*.yml" -print \ - -o -name "*.yaml" -print | \ - xargs yamllint > yaml-violation.log || true + # Yamllint files only in patchset + for yamlfile in $YAML_FILES; do + yamllint $yamlfile >> yaml-violation.log || true + done if [ -s "yaml-violation.log" ]; then - SHOWN=$(cat yaml-violation.log| grep -v "^$" |wc -l) + SHOWN=$(grep -c -v "^$" yaml-violation.log) echo -e "First $SHOWN shown\n---" > lint.log cat yaml-violation.log >> lint.log sed -r -i '4,$s/^/ /g' lint.log diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 5b94607e5..0ea37d941 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -742,15 +742,15 @@ description: 'pxe bridge for booting of Daisy master' - parameter: - name: zte-pod4-defaults + name: zte-virtual5-defaults parameters: - node: name: SLAVE_NAME description: 'Slave name on Jenkins' allowed-slaves: - - zte-pod4 + - zte-virtual5 default-slaves: - - zte-pod4 + - zte-virtual5 - string: name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index ad497e97d..aae6e028e 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -8,7 +8,7 @@ - master: branch: '{stream}' gs-pathname: '' - disabled: false + disabled: true - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' diff --git a/jjb/moon/moon.yml b/jjb/moon/moon.yml index d254129e1..73b0fc731 100644 --- a/jjb/moon/moon.yml +++ b/jjb/moon/moon.yml @@ -11,9 +11,11 @@ - master: branch: '{stream}' gs-pathname: '' + disabled: true - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' + disabled: true - job-template: name: 'moon-verify-{stream}' @@ -55,4 +57,4 @@ - shell: | #!/bin/bash echo "launch Moon unit tests" - nosetest $WORKSPACE/keystone-moon/keystone/tests/moon/unit + #nosetest $WORKSPACE/keystone-moon/keystone/tests/moon/unit diff --git a/jjb/nfvbench/nfvbench.yml b/jjb/nfvbench/nfvbench.yml index 62776d566..a01e9aaa6 100644 --- a/jjb/nfvbench/nfvbench.yml +++ b/jjb/nfvbench/nfvbench.yml @@ -90,4 +90,4 @@ builders: - shell: | - echo "pass" + cd $WORKSPACE && tox diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index f81feab22..28f9354fa 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -10,6 +10,8 @@ branch: 'master' - danube: branch: 'stable/{stream}' + - euphrates: + branch: 'stable/{stream}' project: 'opnfvdocs' rtdproject: 'opnfv' @@ -36,6 +38,7 @@ files: 'docs/**/*.*' builders: + - 'remove-old-docs-from-opnfv-artifacts' - shell: | if [ $GERRIT_BRANCH == "master" ]; then RTD_BUILD_VERSION=latest @@ -73,7 +76,6 @@ project: '**' branch: '{branch}' files: 'docs/**/*.*' - - timed: 'H H * * *' builders: - shell: | @@ -90,4 +92,6 @@ pip install --upgrade pip pip freeze pip install tox + sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini tox -edocs + - 'upload-review-docs' diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml index 95bc8a9dd..3dfb9d155 100644 --- a/jjb/opnfvdocs/opnfvdocs.yml +++ b/jjb/opnfvdocs/opnfvdocs.yml @@ -11,7 +11,6 @@ jobs: - 'opnfvdocs-verify-shellcheck-{stream}' - 'opnfvdocs-merge-shellcheck-{stream}' - - 'opnfvdocs-daily-{stream}' stream: - master: @@ -109,31 +108,3 @@ builders: - check-bash-syntax - -- job-template: - name: 'opnfvdocs-daily-{stream}' - - disabled: true - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: GIT_CLONE_BASE - default: ssh://gerrit.opnfv.org:29418 - description: "Used for overriding the GIT URL coming from parameters macro." - - scm: - - git-scm - - triggers: - - timed: '0 H/6 * * *' - - builders: - - build-html-and-pdf-docs-output -# - upload-generated-docs-to-opnfv-artifacts diff --git a/jjb/ovsnfv/ovsnfv.yml b/jjb/ovsnfv/ovsnfv.yml index ac2c4497f..87c6ca14f 100644 --- a/jjb/ovsnfv/ovsnfv.yml +++ b/jjb/ovsnfv/ovsnfv.yml @@ -113,7 +113,7 @@ - job-template: name: 'ovsnfv-daily-{stream}' - disabled: '{obj:disabled}' + disabled: 'true' parameters: - project-parameter: diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 0c104c0c0..7af4f0fa6 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -6,10 +6,12 @@ - project: name: pharos - project: '{name}' + project: + - '{name}' + - '{name}-tools' jobs: - - 'pharos-verify-{stream}' + - '{project}-verify-{stream}' stream: - master: @@ -22,7 +24,7 @@ disabled: false - job-template: - name: 'pharos-verify-{stream}' + name: '{project}-verify-{stream}' disabled: '{obj:disabled}' diff --git a/jjb/qtip/qtip-experimental-jobs.yml b/jjb/qtip/qtip-experimental-jobs.yml index 4c336d1d5..fdfed2601 100644 --- a/jjb/qtip/qtip-experimental-jobs.yml +++ b/jjb/qtip/qtip-experimental-jobs.yml @@ -33,7 +33,7 @@ branch: '{branch}' # Pin the tests on zte-pod4 with apex deployment - apex-defaults - - zte-pod4-defaults + - zte-virtual5-defaults scm: - git-scm-gerrit diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml index 42240ed95..febe28619 100644 --- a/jjb/qtip/qtip-validate-jobs.yml +++ b/jjb/qtip/qtip-validate-jobs.yml @@ -26,19 +26,19 @@ qpi: - compute: installer: apex - pod: zte-pod4 + pod: zte-virtual5 <<: *master - storage: installer: apex - pod: zte-pod4 + pod: zte-virtual5 <<: *master - compute: installer: apex - pod: zte-pod4 + pod: zte-virtual5 <<: *euphrates - storage: installer: apex - pod: zte-pod4 + pod: zte-virtual5 <<: *euphrates # ------------------------------- diff --git a/jjb/releng/functest-docker.yml b/jjb/releng/functest-docker.yml new file mode 100644 index 000000000..2e24685ee --- /dev/null +++ b/jjb/releng/functest-docker.yml @@ -0,0 +1,256 @@ +--- +############################################## +# job configuration for docker build and push +############################################## +- project: + + name: functest-docker + + project: functest + + stream: + - master: + branch: '{stream}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + disabled: false + + arch_tag: + - 'amd64': + slave_label: 'opnfv-build-ubuntu' + - 'arm64': + slave_label: 'opnfv-build-ubuntu-arm' + + # yamllint disable rule:key-duplicates + image: + - 'core' + - 'healthcheck' + - 'features' + - 'components' + - 'parser' + - 'smoke' + - 'vnf' + - 'restapi' + + # settings for jobs run in multijob phases + build-job-settings: &build-job-settings + current-parameters: false + git-revision: true + node-parameters: true + predefined-parameters: | + PUSH_IMAGE=$PUSH_IMAGE + COMMIT_ID=$COMMIT_ID + RELEASE_VERSION=$RELEASE_VERSION + DOCKERFILE=$DOCKERFILE + ARCH_TAG=$ARCH_TAG + kill-phase-on: FAILURE + abort-all-jobs: false + + manifest-job-settings: &manifest-job-settings + current-parameters: false + git-revision: true + node-parameters: true + predefined-parameters: | + RELEASE_VERSION=$RELEASE_VERSION + ARCH_TAG=$ARCH_TAG + kill-phase-on: FAILURE + abort-all-jobs: false + + # yamllint enable rule:key-duplicates + jobs: + - "functest-docker-build-push-{arch_tag}-{stream}" + - "functest-{image}-build-push-{arch_tag}-{stream}" + - "functest-{image}-create-manifest-{arch_tag}-{stream}" +######################## +# job templates +######################## +- job-template: + name: 'functest-docker-build-push-{arch_tag}-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + parameters: + - job-parameters: + project: '{project}' + branch: '{branch}' + slave_label: '{slave_label}' + arch_tag: '{arch_tag}' + - string: + name: ARCH_TAG + default: "{arch_tag}" + description: "If set, this value will be added to the docker image tag as a prefix" + + properties: + - throttle: + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + triggers: + - pollscm: + cron: "*/30 * * * *" + + builders: + - multijob: + name: 'build-base-img-create-manifest' + execution-type: SEQUENTIAL + projects: + - name: 'functest-core-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-core-create-manifest-{stream}' + <<: *manifest-job-settings + - multijob: + name: 'build-child-img' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'functest-healthcheck-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-features-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-components-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-parser-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-smoke-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-vnf-build-push-{stream}' + <<: *build-job-settings + - name: 'functest-restapi-build-push-{stream}' + <<: *build-job-settings + - multijob: + name: 'create-img-manifest' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'functest-healthcheck-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-features-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-components-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-parser-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-smoke-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-vnf-create-manifest-{stream}' + <<: *manifest-job-settings + - name: 'functest-restapi-create-manifest-{stream}' + <<: *manifest-job-settings + + publishers: + - 'functest-{arch_tag}-recipients' + +- job-template: + + name: 'functest-{image}-build-push-{arch_tag}-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - job-parameters: + project: '{project}' + branch: '{branch}' + slave_label: '{slave_label}' + arch_tag: '{arch_tag}' + - string: + name: DOCKER_REPO_NAME + default: "opnfv/functest-{image}" + description: "Dockerhub repo to be pushed to." + - string: + name: DOCKER_DIR + default: "docker/{image}" + description: "Directory containing files needed by the Dockerfile" + + builders: + - shell: + !include-raw-escape: ./opnfv-docker.sh + +- job-template: + + name: 'functest-{image}-create-manifest-{arch_tag}-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - job-parameters: + project: '{project}' + branch: '{branch}' + slave_label: '{slave_label}' + arch_tag: '{arch_tag}' + - string: + name: DOCKER_REPO_NAME + default: "opnfv/functest-{image}" + description: "Dockerhub repo to be pushed to." + - string: + name: DOCKER_DIR + default: "docker/{image}" + description: "Directory containing files needed by the Dockerfile" + + builders: + - shell: + !include-raw-escape: ./opnfv-manifest.sh + +# parameter macro +- parameter: + name: job-parameters + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: '{slave_label}' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: PUSH_IMAGE + default: "true" + description: "To enable/disable pushing the image to Dockerhub." + - string: + name: COMMIT_ID + default: "" + description: "commit id to make a snapshot docker image" + - string: + name: RELEASE_VERSION + default: "" + description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + - string: + name: DOCKERFILE + default: "Dockerfile" + description: "Dockerfile to use for creating the image." + - string: + name: ARCH_TAG + default: "{arch_tag}" + description: "If set, this value will be added to the docker image tag as a prefix" + - string: + name: PROJECT + default: "{project}" + description: "Project name used to enable job conditions" + +# publisher macros +- publisher: + name: 'functest-arm64-recipients' + publishers: + - email: + recipients: > + cristina.pauna@enea.com + alexandru.avadanii@enea.com + delia.popescu@enea.com + +- publisher: + name: 'functest-amd64-recipients' + publishers: + - email: + recipients: > + jalausuch@suse.com morgan.richomme@orange.com + cedric.ollivier@orange.com feng.xiaowei@zte.com.cn + juha.kosonen@nokia.com wangwulin@huawei.com diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index 298d2af51..402099a91 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -78,8 +78,14 @@ BUILD_BRANCH=$BRANCH if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" elif [[ -n "${RELEASE_VERSION-}" ]]; then - DOCKER_TAG=${BRANCH##*/}.${RELEASE_VERSION} - # e.g. danube.1.0, danube.2.0, danube.3.0 + DOCKER_TAG=${RELEASE_VERSION} + if git checkout ${RELEASE_VERSION}; then + echo "Successfully checked out the git tag ${RELEASE_VERSION}" + else + echo "The tag ${RELEASE_VERSION} doesn't exist in the repository. Existing tags are:" + git tag + exit 1 + fi else DOCKER_TAG="stable" fi diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index f0020aea3..862e77ac8 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -211,7 +211,7 @@ - string: name: RELEASE_VERSION default: "" - description: "Release version, e.g. 1.0, 2.0, 3.0" + description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" - string: name: DOCKERFILE default: "{dockerfile}" diff --git a/jjb/releng/opnfv-docs.yml b/jjb/releng/opnfv-docs.yml deleted file mode 100644 index 740274518..000000000 --- a/jjb/releng/opnfv-docs.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -######################## -# Job configuration for opnfv-docs -######################## -- project: - - name: opnfv-docs - - project: opnfv-docs - - jobs: - - 'opnfv-docs-verify-{stream}' - - 'opnfv-docs-merge-{stream}' - - stream: - - master: - branch: '{stream}' - doc-version: '' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - doc-version: '5.0.0' - gs-pathname: '/{stream}/{doc-version}' - disabled: false - -######################## -# job templates -######################## - -- job-template: - name: 'opnfv-docs-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - projects: - - project-compare-type: 'ANT' - project-pattern: '*' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: docs/** - - compare-type: ANT - pattern: yardstick/** - - builders: - - upload-review-docs - -- job-template: - name: 'opnfv-docs-merge-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: $GERRIT_PROJECT - branch: '{branch}' - - string: - name: GS_URL - default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." - - string: - name: GERRIT_REFSPEC - default: 'refs/heads/{branch}' - description: "JJB configured GERRIT_REFSPEC parameter" - - scm: - - git-scm - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - - comment-added-contains-event: - comment-contains-value: 'rebuild docs' - projects: - - project-compare-type: 'ANT' - project-pattern: '*' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: docs/** - - compare-type: ANT - pattern: yardstick/** - - builders: - - upload-merged-docs diff --git a/jjb/releng/opnfv-manifest.sh b/jjb/releng/opnfv-manifest.sh new file mode 100755 index 000000000..a740491c2 --- /dev/null +++ b/jjb/releng/opnfv-manifest.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# 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 +############################################################################## + + +set -o errexit +set -o nounset +set -o pipefail + +# Starting creating manifest image for $DOCKER_REPO_NAME + +ARCH=(amd64 arm64) +DOCKER_REPO_NAME=${DOCKER_REPO_NAME-} +RELEASE_VERSION=${RELEASE_VERSION-} +BRANCH=${BRANCH-} +ARCH_TAG=${ARCH_TAG-} + +# Before script install manifest-tool: +# cd .. && git clone https://github.com/estesp/manifest-tool +# cd ../manifest-tool && sudo -E make && sudo -E make install + +if [[ "$BRANCH" == "master" ]]; then + DOCKER_TAG="latest" +elif [[ "$BRANCH" == "euphrates" ]]; then + DOCKER_TAG="euphrates" +elif [[ -n "${RELEASE_VERSION}" ]]; then + DOCKER_TAG="${RELEASE_VERSION}" +else + DOCKER_TAG="stable" +fi +if [[ "${ARCH_TAG}" =~ "arm64" || "${ARCH_TAG}" =~ "amd64" ]]; then + sudo manifest-tool push from-args --platforms linux/amd64,linux/arm64 \ + --template "${DOCKER_REPO_NAME}":"${ARCH[0]}"-"${DOCKER_TAG}" \ + --template "${DOCKER_REPO_NAME}":"${ARCH[1]}"-"${DOCKER_TAG}" \ + --target "${DOCKER_REPO_NAME}":"${DOCKER_TAG}" +fi + diff --git a/jjb/vswitchperf/vswitchperf.yml b/jjb/vswitchperf/vswitchperf.yml index bab8b24c2..16ceb2e52 100644 --- a/jjb/vswitchperf/vswitchperf.yml +++ b/jjb/vswitchperf/vswitchperf.yml @@ -15,12 +15,10 @@ branch: '{stream}' gs-pathname: '' disabled: false - slave-label: 'opnfv-build-ubuntu' - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false - slave-label: 'opnfv-build-ubuntu' - job-template: @@ -74,7 +72,17 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ericsson-build4 + default-slaves: + - ericsson-build4 scm: - git-scm-gerrit @@ -136,7 +144,17 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - ericsson-build4 + default-slaves: + - ericsson-build4 scm: - git-scm diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml index 5f0b6572a..f8d39b2fb 100644 --- a/jjb/xci/bifrost-verify-jobs.yml +++ b/jjb/xci/bifrost-verify-jobs.yml @@ -12,19 +12,19 @@ # ------------------------------- distro: - 'xenial': - disabled: true + disabled: false 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' - 'centos7': - disabled: true + disabled: false dib-os-release: '7' dib-os-element: 'centos-minimal' dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' extra-dib-elements: 'openssh-server' - - 'suse': - disabled: true + - 'opensuse423': + disabled: false dib-os-release: '42.3' dib-os-element: 'opensuse-minimal' dib-os-packages: 'vim,less,bridge-utils,iputils,rsyslog,curl' diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index ef0730938..a86ba91c3 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -25,19 +25,24 @@ cd $WORKSPACE/releng-xci cat > bifrost_test.sh<<EOF cd ~/bifrost # provision 3 VMs; xcimaster, controller, and compute -cd $WORKSPACE/bifrost ./scripts/bifrost-provision.sh # list the provisioned VMs -cd $WORKSPACE/bifrost source env-vars ironic node-list sudo -H -E virsh list EOF chmod a+x bifrost_test.sh -./xci/scripts/vm/start-new-vm.sh $DISTRO +# Fix up distros +case ${DISTRO} in + xenial) VM_DISTRO=ubuntu ;; + centos7) VM_DISTRO=centos ;; + *suse*) VM_DISTRO=opensuse ;; +esac -rsync -a $WORKSPACE/bifrost ${DISTRO,,}_xci_vm:~/bifrost +./xci/scripts/vm/start-new-vm.sh $VM_DISTRO -ssh ${DISTRO,,}_xci_vm "cd ~/bifrost && ./bifrost_test.sh" +rsync -a $WORKSPACE/releng-xci ${VM_DISTRO}_xci_vm:~/bifrost + +ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost && ./bifrost_test.sh" diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index 1ae79e12f..481af2a42 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -134,6 +134,17 @@ installer: compass auto-trigger-name: 'daily-trigger-disabled' <<: *euphrates + # daisy CI PODs + - baremetal: + slave-label: zte-pod3 + installer: daisy + auto-trigger-name: 'daily-trigger-disabled' + <<: *master + - virtual: + slave-label: daisy-virtual + installer: daisy + auto-trigger-name: 'daily-trigger-disabled' + <<: *master # ------------------------------- # None-CI PODs # ------------------------------- @@ -154,19 +165,14 @@ <<: *euphrates - zte-pod2: slave-label: '{pod}' - installer: fuel + installer: daisy auto-trigger-name: 'daily-trigger-disabled' <<: *master - zte-pod3: slave-label: '{pod}' - installer: fuel + installer: daisy auto-trigger-name: 'daily-trigger-disabled' <<: *master - - zte-pod3: - slave-label: '{pod}' - installer: fuel - auto-trigger-name: 'daily-trigger-disabled' - <<: *euphrates - orange-pod2: slave-label: '{pod}' installer: joid @@ -276,12 +282,6 @@ !include-raw: ./yardstick-daily.sh - builder: - name: yardstick-vtcdaily - builders: - - shell: - !include-raw: ./yardstick-vtcdaily.sh - -- builder: name: yardstick-fetch-os-creds builders: - shell: @@ -404,6 +404,22 @@ description: 'Arguments to use in order to choose the backend DB' - parameter: + name: 'yardstick-params-daisy-baremetal' + parameters: + - string: + name: YARDSTICK_DB_BACKEND + default: '-i 104.197.68.199:8086' + description: 'Arguments to use in order to choose the backend DB' + +- parameter: + name: 'yardstick-params-daisy-virtual' + parameters: + - string: + name: YARDSTICK_DB_BACKEND + default: '-i 104.197.68.199:8086' + description: 'Arguments to use in order to choose the backend DB' + +- parameter: name: 'yardstick-params-zte-pod1' parameters: - string: diff --git a/jjb/yardstick/yardstick-vtcdaily.sh b/jjb/yardstick/yardstick-vtcdaily.sh deleted file mode 100755 index 737d6806e..000000000 --- a/jjb/yardstick/yardstick-vtcdaily.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e -[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" - -cd $WORKSPACE -./tests/ci/apexlake-verify |