diff options
Diffstat (limited to 'jjb')
28 files changed, 484 insertions, 1042 deletions
diff --git a/jjb/armband/armband-ci-jobs.yaml b/jjb/armband/armband-ci-jobs.yaml index 959115ac2..1fd0d11d9 100644 --- a/jjb/armband/armband-ci-jobs.yaml +++ b/jjb/armband/armband-ci-jobs.yaml @@ -15,6 +15,11 @@ fraser: &fraser stream: fraser branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' + gambia: &gambia + stream: gambia + branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false # ------------------------------- @@ -33,16 +38,23 @@ # ------------------------------- # CI POD's # ------------------------------- - # fraser - # ------------------------------- + # yamllint disable rule:key-duplicates pod: - # yamllint disable rule:key-duplicates + # ------------------------------- + # fraser + # ------------------------------- - armband-baremetal: <<: *baremetal <<: *fraser + # ------------------------------- + # gambia + # ------------------------------- + - armband-baremetal: + <<: *baremetal + <<: *gambia - armband-virtual: <<: *virtual - <<: *fraser + <<: *gambia # ------------------------------- # master # ------------------------------- @@ -74,6 +86,11 @@ auto-trigger-name: '{installer}-{scenario}-{pod}-{stream}-trigger' exclude: + # Dovetail (and only it) should run against Fraser HA baremetal scenarios + - scenario: os-nosdn-nofeature-noha + stream: fraser + - scenario: os-ovn-nofeature-ha + stream: fraser - scenario: os-nosdn-vpp-ha stream: fraser @@ -132,28 +149,42 @@ DEPLOY_SCENARIO={scenario} same-node: true block: true - - trigger-builds: - - project: 'functest-{installer}-{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-{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: 'fraser' + label: '{stream}' + steps: + - trigger-builds: + - project: 'functest-{installer}-{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: 'fraser' + 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.here the stream means the SUT stream, dovetail stream is defined in its own job # 2.testsuite proposed_tests here is for new test cases planning to add into OVP # 3.run proposed_tests on Monday, Wednesday and Friday against ha scenario @@ -167,11 +198,9 @@ - condition-kind: regex-match regex: '.*-ha' label: '{scenario}' - - condition-kind: day-of-week - day-selector: select-days - days: - SAT: true - use-build-time: true + - condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}' @@ -190,11 +219,9 @@ - condition-kind: regex-match regex: '.*-ha' label: '{scenario}' - - condition-kind: day-of-week - day-selector: select-days - days: - SUN: true - use-build-time: true + - condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - project: 'dovetail-{installer}-{pod}-default-{stream}' @@ -208,24 +235,17 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' # Armband uses Fuel's log collection project job, no need to duplicate - - 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' + - 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}' @@ -290,7 +310,7 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '10 1 * * 2,4,6,7' + - timed: '0 1 * * 2,7' - trigger: name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger' triggers: @@ -298,42 +318,61 @@ - trigger: name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 1 * * 2,4,6,7' + - timed: '0 1 * * 4,6' - trigger: name: 'fuel-os-ovn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '10 1 * * 1,3,5' + - timed: '0 1 * * 1' - trigger: name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 1 * * 1,3,5' + - timed: '0 1 * * 3,5' - trigger: name: 'fuel-os-nosdn-vpp-ha-armband-baremetal-master-trigger' triggers: - timed: '' # --------------------------------------------------------------------- -# Enea Armband CI Baremetal Triggers running against fraser branch +# Enea Armband CI Baremetal Triggers running against gambia branch # --------------------------------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-gambia-trigger' triggers: - - timed: '' + - timed: '10 1 * * 1,3' - trigger: - name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl-nofeature-ha-armband-baremetal-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-baremetal-gambia-trigger' triggers: - - timed: '' + - timed: '10 1 * * 5,7' +- trigger: + name: 'fuel-os-ovn-nofeature-ha-armband-baremetal-gambia-trigger' + triggers: + - timed: '10 1 * * 2' - trigger: - name: 'fuel-os-ovn-nofeature-ha-armband-baremetal-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-gambia-trigger' + triggers: + - timed: '10 1 * * 4,6' +- trigger: + name: 'fuel-os-nosdn-vpp-ha-armband-baremetal-gambia-trigger' triggers: - timed: '' +# ------------------------------------------------------------------- +# Enea Armband CI Baremetal Triggers running against fraser branch (for Dovetail) +# ------------------------------------------------------------------- +- trigger: + name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-fraser-trigger' + triggers: + - timed: '5 13 * * 6,7' +- trigger: + name: 'fuel-os-odl-nofeature-ha-armband-baremetal-fraser-trigger' + triggers: + - timed: '0 13 * * 6' - trigger: name: 'fuel-os-nosdn-ovs-ha-armband-baremetal-fraser-trigger' triggers: - - timed: '' + - timed: '0 13 * * 7' # -------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch # -------------------------------------------------------------- @@ -362,25 +401,29 @@ triggers: - timed: '' # ------------------------------------------------------------------- -# Enea Armband CI Virtual Triggers running against fraser branch +# Enea Armband CI Virtual Triggers running against gambia branch # ------------------------------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-ha-armband-virtual-gambia-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-nofeature-noha-armband-virtual-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-armband-virtual-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl-nofeature-ha-armband-virtual-fraser-trigger' + name: 'fuel-os-ovn-nofeature-ha-armband-virtual-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-ovn-nofeature-ha-armband-virtual-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-armband-virtual-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-armband-virtual-fraser-trigger' + name: 'fuel-os-nosdn-vpp-ha-armband-virtual-gambia-trigger' triggers: - timed: '' diff --git a/jjb/armband/armband-verify-jobs.yaml b/jjb/armband/armband-verify-jobs.yaml index 6add90704..57d80aeac 100644 --- a/jjb/armband/armband-verify-jobs.yaml +++ b/jjb/armband/armband-verify-jobs.yaml @@ -4,7 +4,6 @@ project: 'armband' - installer: 'fuel' ##################################### # branch definitions ##################################### @@ -13,30 +12,22 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: + - gambia: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false ##################################### - # patch verification phases - ##################################### - phase: - - 'deploy-virtual': - slave-label: 'armband-virtual' - ##################################### # jobs ##################################### jobs: - 'armband-verify-{stream}' - - 'armband-verify-{phase}-{stream}' + ##################################### # job templates ##################################### - job-template: name: 'armband-verify-{stream}' - project-type: multijob - disabled: '{obj:disabled}' concurrent: true @@ -45,14 +36,8 @@ - logrotate-default - throttle: enabled: true - max-total: 4 + max-total: 2 option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-virtual-daily-.*' - - 'armband-verify-.*' - block-level: 'NODE' scm: - git-scm-gerrit @@ -97,100 +82,19 @@ - project-parameter: project: '{project}' branch: '{branch}' - - 'armband-virtual-defaults': - installer: '{installer}' - - '{installer}-defaults': - gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' + - 'opnfv-build-ubuntu-arm-defaults' builders: - description-setter: description: "Built on $NODE_NAME" - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'armband-verify-deploy-virtual-{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: true - kill-phase-on: FAILURE - abort-all-job: true - - - multijob: - name: smoke-test - condition: SUCCESSFUL - projects: - # Use Functest job definition from jjb/functest/functest-daily-jobs - - name: 'functest-fuel-armband-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck - # Should be in sync with fuel-deploy.sh default scenario - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - BRANCH=$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: NEVER - abort-all-job: true - -- job-template: - name: 'armband-verify-{phase}-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - properties: - - logrotate-default - - throttle: - enabled: true - max-total: 2 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'armband-verify-deploy-.*' - block-level: 'NODE' - - scm: - - git-scm-gerrit + - 'armband-verify-builder-macro' - wrappers: - - ssh-agent-wrapper - - timeout: - timeout: 360 - fail: true - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{slave-label}-defaults' - - 'armband-virtual-defaults': - installer: '{installer}' - - '{installer}-defaults': - gs-pathname: '{gs-pathname}' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - '{project}-verify-{phase}-macro' ##################################### # builder macros ##################################### - builder: - name: 'armband-verify-deploy-virtual-macro' + name: 'armband-verify-builder-macro' builders: - - shell: - !include-raw: ../fuel/fuel-deploy.sh + - shell: | + #!/bin/bash + make fuel-patches-import diff --git a/jjb/container4nfv/container4nfv-arm64.yaml b/jjb/container4nfv/container4nfv-arm64.yaml index 069a5d25e..9ebaea97b 100644 --- a/jjb/container4nfv/container4nfv-arm64.yaml +++ b/jjb/container4nfv/container4nfv-arm64.yaml @@ -33,7 +33,7 @@ wrappers: - timeout: - timeout: 210 + timeout: 300 fail: true scm: @@ -63,6 +63,8 @@ unstable-threshold: 'Failure' - project: functest-compass-arm-virtual-daily-master current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} same-node: true block: true block-thresholds: diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 739da9eac..065d20128 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -51,11 +51,6 @@ elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then # replace the default one by the customized one provided by jenkins config fi -# Set iptables rule to allow forwarding return traffic for container -if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then - sudo iptables -I FORWARD -j RETURN -fi - releng_repo=${WORKSPACE}/releng [ -d ${releng_repo} ] && sudo rm -rf ${releng_repo} git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null @@ -218,6 +213,11 @@ process_info: - {testcase_name: yardstick.ha.neutron_l3_agent, attack_process: neutron-l3-agent, attack_host: cmp01} - {testcase_name: yardstick.ha.database, attack_process: mysqld, attack_host: dbs01} EOF + elif [ "$INSTALLER_TYPE" == "compass" ]; then + cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml +process_info: +- {testcase_name: yardstick.ha.rabbitmq, attack_process: rabbitmq} +EOF fi echo "file ${DOVETAIL_CONFIG}/pod.yaml:" diff --git a/jjb/fuel/fuel-daily-jobs.yaml b/jjb/fuel/fuel-daily-jobs.yaml index 07cdb7345..c2a3dd7ca 100644 --- a/jjb/fuel/fuel-daily-jobs.yaml +++ b/jjb/fuel/fuel-daily-jobs.yaml @@ -21,8 +21,8 @@ branch: 'stable/{stream}' disabled: false gs-pathname: '/{stream}' - danube: &danube - stream: danube + gambia: &gambia + stream: gambia branch: 'stable/{stream}' disabled: false gs-pathname: '/{stream}' @@ -40,9 +40,12 @@ <<: *master - baremetal: slave-label: fuel-baremetal - <<: *fraser + <<: *gambia - virtual: slave-label: fuel-virtual + <<: *gambia + - baremetal: + slave-label: fuel-baremetal <<: *fraser # ------------------------------- # None-CI PODs @@ -59,22 +62,10 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-odl-nofeature-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-sfc-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-nofeature-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-ovn-nofeature-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-ovs-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm_ovs-ha': - auto-trigger-name: 'daily-trigger-disabled' - - 'os-nosdn-kvm_ovs_dpdk-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm_ovs_dpdk_bar-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-vpp-ha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' # NOHA scenarios @@ -82,47 +73,37 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-odl-nofeature-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-sfc-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-onos-nofeature-noha': + - 'os-odl-sfc-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-ovn-nofeature-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-odl-ovs-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-ovs-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm_ovs_dpdk-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - - 'os-nosdn-kvm_ovs_dpdk_bar-noha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-vpp-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - # danube scenario for Dovetail only - - 'os-odl_l2-bgpvpn-ha': - auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' exclude: - - scenario: os-odl_l2-bgpvpn-ha - stream: master - - scenario: os-odl_l2-bgpvpn-ha + # Dovetail (and only it) should run against Fraser HA baremetal scenarios + - scenario: os-nosdn-nofeature-noha + stream: fraser + - scenario: os-odl-nofeature-noha + stream: fraser + - scenario: os-odl-sfc-noha stream: fraser - - scenario: os-ovn-nofeature-noha - stream: danube - - scenario: os-ovn-nofeature-ha - stream: danube - scenario: os-odl-ovs-noha stream: fraser - - scenario: os-nosdn-vpp-ha + - scenario: os-ovn-nofeature-noha + stream: fraser + - scenario: os-nosdn-ovs-noha stream: fraser - scenario: os-nosdn-vpp-noha stream: fraser + - scenario: os-ovn-nofeature-ha + stream: fraser - scenario: os-nosdn-vpp-ha - stream: danube - - scenario: os-nosdn-vpp-noha - stream: danube + stream: fraser jobs: - 'fuel-{scenario}-{pod}-daily-{stream}' @@ -150,7 +131,6 @@ use-build-blocker: true blocking-jobs: - 'fuel-os-.*?-{pod}-daily-.*' - - 'fuel-os-.*?-{pod}-weekly-.*' - 'fuel-verify-.*' block-level: 'NODE' @@ -183,42 +163,33 @@ 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' - # 1.here the stream means the SUT stream, dovetail stream is defined in its own job - # 2.testsuite default here is for the test cases already added into OVP - # 3.run default testsuite mandatory test cases against ha scenario - # 4.run default testsuite optional test cases against ha scenario - # 5.not used for release criteria or compliance, only to debug the dovetail tool bugs - conditional-step: - condition-kind: and - condition-operands: - - condition-kind: regex-match - regex: '.*-ha' - label: '{scenario}' + condition-kind: not + condition-operand: + condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - - project: 'dovetail-fuel-{pod}-default-mandatory-{stream}' + - 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: 'fraser' + label: '{stream}' + steps: + - trigger-builds: + - project: 'yardstick-fuel-{pod}-daily-{stream}' current-parameters: false predefined-parameters: DEPLOY_SCENARIO={scenario} @@ -228,15 +199,23 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + # 1.here the stream means the SUT stream, dovetail stream is defined in its own job + # 2.testsuite default here is for the test cases already added into OVP + # 3.run default testsuite mandatory test cases against ha scenario + # 4.run default testsuite optional test cases against ha scenario + # 5.not used for release criteria or compliance, only to debug the dovetail tool bugs - conditional-step: condition-kind: and condition-operands: - condition-kind: regex-match regex: '.*-ha' label: '{scenario}' + - condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - - project: 'dovetail-fuel-{pod}-default-optional-{stream}' + - project: 'dovetail-fuel-{pod}-default-mandatory-{stream}' current-parameters: false predefined-parameters: DEPLOY_SCENARIO={scenario} @@ -247,14 +226,17 @@ failure-threshold: 'never' unstable-threshold: 'FAILURE' - conditional-step: - condition-kind: not - condition-operand: - condition-kind: regex-match - regex: 'danube' - label: '{stream}' + condition-kind: and + condition-operands: + - condition-kind: regex-match + regex: '.*-ha' + label: '{scenario}' + - condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - - project: 'fuel-collect-logs-{pod}-daily-{stream}' + - project: 'dovetail-fuel-{pod}-default-optional-{stream}' current-parameters: false predefined-parameters: DEPLOY_SCENARIO={scenario} @@ -264,6 +246,17 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'fuel-collect-logs-{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' publishers: - email-fuel-ptl @@ -287,9 +280,6 @@ use-build-blocker: true blocking-jobs: - 'fuel-deploy-{pod}-daily-.*' - - 'fuel-deploy-generic-daily-.*' - - 'fuel-deploy-{pod}-weekly-.*' - - 'fuel-deploy-generic-weekly-.*' block-level: 'NODE' parameters: @@ -317,8 +307,6 @@ description: "Built on $NODE_NAME" - track-begin-timestamp - shell: - !include-raw-escape: ./fuel-download-artifact.sh - - shell: !include-raw-escape: ./fuel-deploy.sh publishers: @@ -384,30 +372,10 @@ triggers: - timed: '5 5 * * *' - trigger: - name: 'fuel-os-onos-sfc-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 5 * * *' -- trigger: - name: 'fuel-os-onos-nofeature-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 8 * * *' -- trigger: name: 'fuel-os-ovn-nofeature-ha-baremetal-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '5 17 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '30 12 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-master-trigger' - triggers: - - timed: '' # '30 8 * * *' -- trigger: name: 'fuel-os-nosdn-vpp-ha-baremetal-daily-master-trigger' triggers: - timed: '' @@ -422,11 +390,7 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-baremetal-daily-master-trigger' + name: 'fuel-os-odl-sfc-noha-baremetal-daily-master-trigger' triggers: - timed: '' - trigger: @@ -438,100 +402,64 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-vpp-noha-baremetal-daily-master-trigger' triggers: - timed: '' # ---------------------------------------------- -# Triggers for job running on fuel-baremetal against fraser branch +# Triggers for job running on fuel-baremetal against gambia branch # ---------------------------------------------- # HA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-fraser-trigger' - triggers: - - timed: '0 20 * * 1,3,7' -- trigger: - name: 'fuel-os-odl-nofeature-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '' # '0 2 * * *' + - timed: '0 20 * * *' - trigger: - name: 'fuel-os-onos-sfc-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '' # '0 5 * * *' + - timed: '0 2 * * *' - trigger: - name: 'fuel-os-ovn-nofeature-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-ha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '' # '0 8 * * *' + - timed: '0 5 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-ha-baremetal-daily-fraser-trigger' - triggers: - - timed: '' # '0 17 * * *' -- trigger: - name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-fraser-trigger' - triggers: - - timed: '' # '0 20 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-baremetal-daily-fraser-trigger' - triggers: - - timed: '' # '0 12 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-baremetal-daily-fraser-trigger' - triggers: - - timed: '' # '0 8 * * *' -# NOHA Scenarios -- trigger: - name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-fraser-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-vpp-ha-baremetal-daily-gambia-trigger' triggers: - timed: '' +# NOHA Scenarios - trigger: - name: 'fuel-os-onos-sfc-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-onos-nofeature-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-odl-sfc-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-odl-ovs-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-vpp-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' # ---------------------------------------------- @@ -546,34 +474,14 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-ovn-nofeature-ha-virtual-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-ovs-ha-virtual-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-vpp-ha-virtual-daily-master-trigger' triggers: - timed: '' @@ -587,13 +495,9 @@ triggers: - timed: '5 18 * * *' - trigger: - name: 'fuel-os-onos-sfc-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '35 20 * * *' -- trigger: - name: 'fuel-os-onos-nofeature-noha-virtual-daily-master-trigger' + name: 'fuel-os-odl-sfc-noha-virtual-daily-master-trigger' triggers: - - timed: '' # '5 23 * * *' + - timed: '5 4 * * *' - trigger: name: 'fuel-os-ovn-nofeature-noha-virtual-daily-master-trigger' triggers: @@ -603,101 +507,80 @@ triggers: - timed: '5 2 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '35 6 * * *' -- trigger: name: 'fuel-os-nosdn-ovs-noha-virtual-daily-master-trigger' triggers: - timed: '5 9 * * *' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '30 16 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-master-trigger' - triggers: - - timed: '' # '30 20 * * *' -- trigger: name: 'fuel-os-nosdn-vpp-noha-virtual-daily-master-trigger' triggers: - timed: '' # ---------------------------------------------- -# Triggers for job running on fuel-virtual against fraser branch +# Triggers for job running on fuel-baremetal against fraser branch (for Dovetail) # ---------------------------------------------- - trigger: - name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-fraser-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-fraser-trigger' triggers: - - timed: '' + - timed: '5 13 * * 6,7' - trigger: - name: 'fuel-os-onos-sfc-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-baremetal-daily-fraser-trigger' triggers: - - timed: '' + - timed: '0 13 * * 6' - trigger: - name: 'fuel-os-onos-nofeature-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-fraser-trigger' triggers: - - timed: '' + - timed: '0 13 * * 7' +# ---------------------------------------------- +# Triggers for job running on fuel-virtual against gambia branch +# ---------------------------------------------- - trigger: - name: 'fuel-os-ovn-nofeature-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-vpp-ha-virtual-daily-gambia-trigger' triggers: - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '0 13 * * *' + - timed: '0 13 * * *' - trigger: - name: 'fuel-os-odl-nofeature-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '0 18 * * *' + - timed: '0 18 * * *' - trigger: - name: 'fuel-os-ovn-nofeature-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-odl-sfc-noha-virtual-daily-gambia-trigger' triggers: - - timed: '5 23 * * *' + - timed: '0 4 * * *' - trigger: - name: 'fuel-os-onos-sfc-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '30 20 * * *' + - timed: '0 23 * * *' - trigger: - name: 'fuel-os-onos-nofeature-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-odl-ovs-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '0 23 * * *' + - timed: '0 2 * * *' - trigger: - name: 'fuel-os-nosdn-kvm-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '30 6 * * *' + - timed: '0 9 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-vpp-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '0 9 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-virtual-daily-fraser-trigger' - triggers: - - timed: '' # '0 16 * * *' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-virtual-daily-fraser-trigger' - triggers: - - timed: '' # '0 20 * * *' + - timed: '' # ---------------------------------------------- # ZTE POD1 Triggers running against master branch # ---------------------------------------------- @@ -710,34 +593,14 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-ovn-nofeature-ha-zte-pod1-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-vpp-ha-zte-pod1-daily-master-trigger' triggers: - timed: '' @@ -751,11 +614,7 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-master-trigger' + name: 'fuel-os-odl-sfc-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' - trigger: @@ -767,22 +626,10 @@ triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-master-trigger' - triggers: - - timed: '' -- trigger: name: 'fuel-os-nosdn-vpp-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index dace7fc7f..c0cdc3dc2 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -1,7 +1,7 @@ #!/bin/bash # SPDX-license-identifier: Apache-2.0 ############################################################################## -# Copyright (c) 2017 Ericsson AB, Mirantis Inc., Enea Software AB and others. +# Copyright (c) 2018 Ericsson AB, Mirantis Inc., Enea Software AB 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 @@ -12,83 +12,37 @@ set -o pipefail export TERM="vt220" -if [[ "$BRANCH" =~ 'danube' ]]; then - # source the file so we get OPNFV vars - # shellcheck disable=SC1091 - source latest.properties - - # echo the info about artifact that is used during the deployment - echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" - - # for Danube deployments (no artifact for current master or newer branches) - # checkout the commit that was used for building the downloaded artifact - # to make sure the ISO and deployment mechanism uses same versions - echo "Checking out ${OPNFV_GIT_SHA1}" - git checkout "${OPNFV_GIT_SHA1}" --quiet - - # releng wants us to use nothing else but opnfv.iso for now. We comply. - ISO_FILE_ARG="-i file://${WORKSPACE}/opnfv.iso" -fi - -# shellcheck disable=SC2153 -if [[ "${JOB_NAME}" =~ 'verify' ]]; then - # set simplest scenario for virtual deploys to run for verify - DEPLOY_SCENARIO="os-nosdn-nofeature-noha" -fi - # set deployment parameters export TMPDIR=${HOME}/tmpdir # shellcheck disable=SC2153 LAB_NAME=${NODE_NAME/-*} # shellcheck disable=SC2153 POD_NAME=${NODE_NAME/*-} -# Armband might override LAB_CONFIG_URL, all others use the default -LAB_CONFIG_URL=${LAB_CONFIG_URL:-'ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab'} - -# Fuel requires deploy script to be ran with sudo, Armband does not -SUDO='sudo -E' -if [ "${PROJECT}" = 'fuel' ]; then - # Fuel currently supports ericsson, intel, lf and zte labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi -else - SUDO= - # Armband currently supports arm, enea, unh labs - if [[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]]; then - echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" - exit 1 - fi + +# Fuel currently supports arm, enea, ericsson, intel, lf, unh and zte labs +if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then + echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!" + exit 1 fi echo "Using configuration for ${LAB_NAME}" # create TMPDIR if it doesn't exist, change permissions mkdir -p "${TMPDIR}" -chmod a+x "${HOME}" "${TMPDIR}" +sudo chmod a+x "${HOME}" "${TMPDIR}" cd "${WORKSPACE}" || exit 1 -if [[ "$BRANCH" =~ (danube|euphrates) ]]; then - if [[ "${LAB_CONFIG_URL}" =~ ^(git|ssh):// ]]; then - echo "Cloning securedlab repo ${BRANCH}" - LOCAL_CFG="${TMPDIR}/securedlab" - rm -rf "${LOCAL_CFG}" - git clone --quiet --branch "${BRANCH}" "${LAB_CONFIG_URL}" "${LOCAL_CFG}" - LAB_CONFIG_ARG="-b file://${LOCAL_CFG}" - BRIDGE_ARG="-B ${BRIDGE:-pxebr}" - else - LAB_CONFIG_ARG="-b ${LAB_CONFIG_URL}" - fi -fi # log file name FUEL_LOG_FILENAME="${JOB_NAME}_${BUILD_NUMBER}.log.tar.gz" +# Limited scope for vPOD verify jobs running on armband-virtual +[[ ! "${JOB_NAME}" =~ verify-deploy-virtual-arm64 ]] || EXTRA_ARGS='-e' + # construct the command -DEPLOY_COMMAND="${SUDO} ${WORKSPACE}/ci/deploy.sh ${LAB_CONFIG_ARG:-} \ - -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} ${ISO_FILE_ARG:-} \ - -S ${TMPDIR} ${BRIDGE_ARG:-} \ +DEPLOY_COMMAND="${WORKSPACE}/ci/deploy.sh \ + -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \ + -S ${TMPDIR} ${EXTRA_ARGS:-} \ -L ${WORKSPACE}/${FUEL_LOG_FILENAME}" # log info to console @@ -97,7 +51,6 @@ echo "--------------------------------------------------------" echo "Scenario: ${DEPLOY_SCENARIO}" echo "Lab: ${LAB_NAME}" echo "POD: ${POD_NAME}" -[[ "${BRANCH}" =~ 'danube' ]] && echo "ISO: ${OPNFV_ARTIFACT_URL/*\/}" echo echo "Starting the deployment using ${INSTALLER_TYPE}. This could take some time..." echo "--------------------------------------------------------" @@ -117,7 +70,7 @@ echo "Deployment is done!" # upload logs for baremetal deployments # work with virtual deployments is still going on, so skip that for now -if [[ "${JOB_NAME}" =~ (baremetal-daily|baremetal-weekly) ]]; then +if [[ "${JOB_NAME}" =~ baremetal-daily ]]; then echo "Uploading deployment logs" gsutil cp "${WORKSPACE}/${FUEL_LOG_FILENAME}" \ "gs://${GS_URL}/logs/${FUEL_LOG_FILENAME}" > /dev/null 2>&1 diff --git a/jjb/fuel/fuel-docker-jobs.yaml b/jjb/fuel/fuel-docker-jobs.yaml index 98ed66da7..21656ed05 100644 --- a/jjb/fuel/fuel-docker-jobs.yaml +++ b/jjb/fuel/fuel-docker-jobs.yaml @@ -14,7 +14,7 @@ disabled: false - gambia: branch: 'stable/{stream}' - disabled: true + disabled: false arch_tag: - 'amd64': @@ -119,7 +119,7 @@ *) tag="{stream}" ;; esac - sudo ./ci/build.sh $tag + ./ci/build.sh $tag - job-template: name: 'fuel-docker-manifest-{stream}' diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh deleted file mode 100755 index 02ca10305..000000000 --- a/jjb/fuel/fuel-download-artifact.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB 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 -############################################################################## -set -o errexit -set -o pipefail - -# disable Fuel ISO download for master branch -[[ ! "$BRANCH" =~ (danube) ]] && exit 0 - -# use proxy url to replace the normal URL, or googleusercontent.com will be blocked randomly -[[ "$NODE_NAME" =~ (zte) ]] && GS_URL=${GS_BASE_PROXY%%/*}/$GS_URL - -# get the latest.properties file in order to get info regarding latest artifact -echo "Downloading http://$GS_URL/latest.properties" -curl -L -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties - -# check if we got the file -[[ -f $WORKSPACE/latest.properties ]] || exit 1 - -# source the file so we get artifact metadata -source $WORKSPACE/latest.properties - -# echo the info about artifact that is used during the deployment -OPNFV_ARTIFACT=${OPNFV_ARTIFACT_URL/*\/} -echo "Using $OPNFV_ARTIFACT for deployment" - -# check if we already have the ISO to avoid redownload -ISOSTORE="/iso_mount/opnfv_ci/${BRANCH##*/}" -if [[ -f "$ISOSTORE/$OPNFV_ARTIFACT" ]]; then - echo "ISO exists locally. Skipping the download and using the file from ISO store" - ln -s $ISOSTORE/$OPNFV_ARTIFACT $WORKSPACE/opnfv.iso - echo "--------------------------------------------------------" - echo - ls -al $WORKSPACE/opnfv.iso - echo - echo "--------------------------------------------------------" - echo "Done!" - exit 0 -fi - -[[ "$NODE_NAME" =~ (zte) ]] && OPNFV_ARTIFACT_URL=${GS_BASE_PROXY%%/*}/$OPNFV_ARTIFACT_URL - -# log info to console -echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL" -echo "This could take some time..." -echo "--------------------------------------------------------" -echo - -# download the file -curl -L -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1 - -# list the file -ls -al $WORKSPACE/opnfv.iso - -echo -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/fuel/fuel-lab-reconfig.sh b/jjb/fuel/fuel-lab-reconfig.sh deleted file mode 100755 index 4b42a396e..000000000 --- a/jjb/fuel/fuel-lab-reconfig.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB 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 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# check to see if ucs login info file exists -if [ -e ~/.ssh/ucs_creds ];then - source ~/.ssh/ucs_creds -else - echo "Unable to find UCS credentials for LF lab reconfiguration...Exiting" - exit 1 -fi - -# clone releng -echo "Cloning releng repo..." -if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; then - echo "Unable to clone releng repo...Exiting" - exit 1 -fi - -# log info to console -echo "Starting the lab reconfiguration for $INSTALLER_TYPE..." -echo "--------------------------------------------------------" -echo - -# create venv -$WORKSPACE/releng/utils/lab-reconfiguration/create_venv.sh - -# disable nounset because 'activate' script contains unbound variable(s) -set +o nounset -# enter venv -source $WORKSPACE/releng/utils/lab-reconfiguration/venv/bin/activate -# set nounset back again -set -o nounset - -# verify we are in venv -if [[ ! $(which python | grep venv) ]]; then - echo "Unable to activate venv...Exiting" - exit 1 -fi - -python $WORKSPACE/releng/utils/lab-reconfiguration/reconfigUcsNet.py -i $ucs_host -u $ucs_user -p $ucs_password -f $WORKSPACE/releng/utils/lab-reconfiguration/fuel.yaml - -# while undergoing reboot -sleep 30 - -# check to see if slave is back up -ping_counter=0 -ping_flag=0 -while [ "$ping_counter" -lt 20 ]; do - if [[ $(ping -c 5 172.30.10.72) ]]; then - ping_flag=1 - break - fi - ((ping_counter++)) - sleep 10 -done - -if [ "$ping_flag" -eq 1 ]; then - echo "Slave is pingable, now wait 180 seconds for services to start" - sleep 180 -else - echo "Slave did not come back up after reboot: please check lf-pod2" - exit 1 -fi - -set +o nounset -deactivate - -echo -echo "--------------------------------------------------------" -echo "Done!" diff --git a/jjb/fuel/fuel-project-jobs.yaml b/jjb/fuel/fuel-project-jobs.yaml index 40ba6e696..400b1552c 100644 --- a/jjb/fuel/fuel-project-jobs.yaml +++ b/jjb/fuel/fuel-project-jobs.yaml @@ -14,7 +14,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: + - gambia: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -25,62 +25,4 @@ rtd-token: 38f40bf6c08fd4bccb930871bc29b08404cf98b0 jobs: - - 'fuel-deploy-generic-daily-{stream}' - '{project-name}-rtd-jobs' - -######################## -# job templates -######################## -- job-template: - name: 'fuel-deploy-generic-daily-{stream}' - - concurrent: true - - disabled: '{obj:disabled}' - - properties: - - logrotate-default - - throttle: - enabled: true - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-daily-.*' - - 'fuel-deploy-generic-daily-.*' - block-level: 'NODE' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults': - gs-pathname: '{gs-pathname}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' - - string: - name: DEPLOY_SCENARIO - default: 'os-odl-nofeature-ha' - - node: - name: SLAVE_NAME - description: 'Slave name on Jenkins' - allowed-slaves: - - ericsson-pod2 - - lf-pod2 - - ericsson-pod1 - default-slaves: - - ericsson-pod2 - - scm: - - git-scm - - wrappers: - - build-name: - name: '$BUILD_NUMBER - POD: $NODE_NAME Scenario: $DEPLOY_SCENARIO' - - builders: - - shell: - !include-raw-escape: ./fuel-deploy.sh diff --git a/jjb/fuel/fuel-set-scenario.sh b/jjb/fuel/fuel-set-scenario.sh new file mode 100755 index 000000000..4c8ed7334 --- /dev/null +++ b/jjb/fuel/fuel-set-scenario.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE, Mirantis Inc., Enea Software AB 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 +############################################################################## +set -o pipefail +set -x + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# This function allows developers to specify the impacted scenario by +# requesting a RE-check via a gerrit change comment under a specific format. +# +# Patterns to be searched in change comment: +# recheck: <scenario-name> +# reverify: <scenario-name> +# Examples: +# recheck: os-odl-ovs-noha +# reverify: os-nosdn-nofeature-ha + +function set_scenario() { + # process gerrit event comment text (if present) + DEPLOY_SCENARIO=$(echo "${GERRIT_EVENT_COMMENT_TEXT}" | \ + grep -Po '(?!:(recheck|reverify):\s*)([-\w]+ha)') + if [ -z "${DEPLOY_SCENARIO}" ]; then + if [[ "$JOB_NAME" =~ baremetal ]]; then + DEPLOY_SCENARIO='os-nosdn-nofeature-ha' + else + DEPLOY_SCENARIO='os-nosdn-nofeature-noha' + fi + fi + # save the scenario names into java properties file + # so they can be injected to downstream jobs via envInject + echo "Recording the scenario '${DEPLOY_SCENARIO}' for downstream jobs" + echo "DEPLOY_SCENARIO=${DEPLOY_SCENARIO}" > "$WORK_DIRECTORY/scenario.properties" +} + +# ensure GERRIT vars are set +[ -n "${GERRIT_CHANGE_NUMBER}" ] || exit 1 +GERRIT_EVENT_COMMENT_TEXT="${GERRIT_EVENT_COMMENT_TEXT:-''}" + +# this directory is where the temporary properties file will be stored +WORK_DIRECTORY=/tmp/$GERRIT_CHANGE_NUMBER +/bin/rm -rf "$WORK_DIRECTORY" && mkdir -p "$WORK_DIRECTORY" + +set_scenario diff --git a/jjb/fuel/fuel-verify-jobs.yaml b/jjb/fuel/fuel-verify-jobs.yaml index 2a8fe3b5d..56f0145f5 100644 --- a/jjb/fuel/fuel-verify-jobs.yaml +++ b/jjb/fuel/fuel-verify-jobs.yaml @@ -13,7 +13,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: + - gambia: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false @@ -22,28 +22,34 @@ ##################################### arch_tag: - 'amd64': - slave-label: 'fuel-virtual' - functest-suite-label: 'fuel-virtual' + slave-label: 'fuel' + functest-suite-label: 'fuel' - 'arm64': - slave-label: 'armband-virtual' - functest-suite-label: 'fuel-armband-virtual' + slave-label: 'armband' + functest-suite-label: 'fuel-armband' + ##################################### + # cluster types + ##################################### + type: + - 'virtual' + - 'baremetal' ##################################### # patch verification phases ##################################### phase: - 'docker-build' - - 'deploy-virtual' + - 'deploy' ##################################### # jobs ##################################### jobs: - - 'fuel-verify-{arch_tag}-{stream}' - - 'fuel-verify-{phase}-{arch_tag}-{stream}' + - 'fuel-verify-{type}-{arch_tag}-{stream}' + - 'fuel-verify-{phase}-{type}-{arch_tag}-{stream}' ##################################### # job templates ##################################### - job-template: - name: 'fuel-verify-{arch_tag}-{stream}' + name: 'fuel-verify-{type}-{arch_tag}-{stream}' project-type: multijob @@ -60,7 +66,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'fuel-os-.*?-virtual-daily-.*' + - 'fuel-os-.*?-daily-.*' - 'fuel-verify-.*' block-level: 'NODE' @@ -74,7 +80,7 @@ fail: true triggers: - - 'fuel-verify-{arch_tag}-trigger': + - 'fuel-verify-{type}-{arch_tag}-trigger': project: '{project}' branch: '{branch}' @@ -82,22 +88,22 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults': + - '{slave-label}-{type}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' - - string: - name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-ha' builders: + - 'fuel-verify-set-scenario-macro' + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/scenario.properties" - description-setter: - description: "Built on $NODE_NAME" + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" - multijob: name: docker-build condition: SUCCESSFUL projects: - - name: 'fuel-verify-docker-build-{arch_tag}-{stream}' + - name: 'fuel-verify-docker-build-{type}-{arch_tag}-{stream}' current-parameters: false predefined-parameters: | BRANCH=$BRANCH @@ -109,13 +115,14 @@ abort-all-job: true - multijob: - name: deploy-virtual + name: deploy condition: SUCCESSFUL projects: - - name: 'fuel-verify-deploy-virtual-{arch_tag}-{stream}' + - name: 'fuel-verify-deploy-{type}-{arch_tag}-{stream}' current-parameters: false predefined-parameters: | MCP_DOCKER_TAG={arch_tag}-verify + DEPLOY_SCENARIO=$DEPLOY_SCENARIO BRANCH=$BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER @@ -129,7 +136,7 @@ condition: SUCCESSFUL projects: # Use Functest job definition from jjb/functest/functest-daily-jobs - - name: 'functest-{functest-suite-label}-suite-{stream}' + - name: 'functest-{functest-suite-label}-{type}-suite-{stream}' current-parameters: false predefined-parameters: | FUNCTEST_MODE=tier @@ -140,11 +147,12 @@ GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE node-parameters: true + enable-condition: "def m = ! ('$NODE_LABELS' =~ /armband-virtual/)" kill-phase-on: NEVER abort-all-job: true - job-template: - name: 'fuel-verify-{phase}-{arch_tag}-{stream}' + name: 'fuel-verify-{phase}-{type}-{arch_tag}-{stream}' disabled: '{obj:disabled}' @@ -177,7 +185,7 @@ - project-parameter: project: '{project}' branch: '{branch}' - - '{slave-label}-defaults': + - '{slave-label}-{type}-defaults': installer: '{installer}' - '{installer}-defaults': gs-pathname: '{gs-pathname}' @@ -190,9 +198,9 @@ # trigger macros ######################## - trigger: - name: 'fuel-verify-amd64-trigger' + name: 'fuel-verify-virtual-amd64-trigger' triggers: - - gerrit: &fuel_verify_amd64_trigger + - gerrit: &fuel_verify_virtual_amd64_trigger server-name: 'gerrit.opnfv.org' trigger-on: - patchset-created-event: @@ -201,9 +209,7 @@ exclude-no-code-change: 'false' - draft-published-event - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: '(recheck|reverify)(\s|$|:\s*[-\w]+-noha)' projects: - project-compare-type: 'ANT' project-pattern: '{project}' @@ -221,10 +227,23 @@ pattern: 'docs/**' readable-message: true - trigger: - name: 'fuel-verify-arm64-trigger' + name: 'fuel-verify-virtual-arm64-trigger' triggers: - gerrit: - <<: *fuel_verify_amd64_trigger + <<: *fuel_verify_virtual_amd64_trigger +- trigger: + name: 'fuel-verify-baremetal-amd64-trigger' + triggers: + - gerrit: &fuel_verify_baremetal_amd64_trigger + <<: *fuel_verify_virtual_amd64_trigger + trigger-on: + - comment-added-contains-event: + comment-contains-value: '(recheck|reverify):\s*[-\w]+-ha' +- trigger: + name: 'fuel-verify-baremetal-arm64-trigger' + triggers: + - gerrit: + <<: *fuel_verify_baremetal_amd64_trigger skip-vote: successful: true failed: true @@ -234,7 +253,12 @@ # builder macros ##################################### - builder: - name: 'fuel-verify-deploy-virtual-macro' + name: 'fuel-verify-set-scenario-macro' + builders: + - shell: + !include-raw: ./fuel-set-scenario.sh +- builder: + name: 'fuel-verify-deploy-macro' builders: - shell: !include-raw: ./fuel-deploy.sh @@ -243,4 +267,4 @@ builders: - shell: | #!/bin/bash -ex - sudo ./ci/build.sh 'verify' '' + sudo -E ./ci/build.sh 'verify' '' diff --git a/jjb/fuel/fuel-weekly-jobs.yaml b/jjb/fuel/fuel-weekly-jobs.yaml deleted file mode 100644 index c6b921729..000000000 --- a/jjb/fuel/fuel-weekly-jobs.yaml +++ /dev/null @@ -1,189 +0,0 @@ ---- -# jenkins job templates for Fuel -- project: - - name: fuel-weekly - - project: fuel - - installer: fuel - - # ------------------------------- - # BRANCH ANCHORS - # ------------------------------- - master: &master - stream: master - branch: '{stream}' - disabled: false - gs-pathname: '' - fraser: &fraser - stream: fraser - branch: 'stable/{stream}' - disabled: false - gs-pathname: '/{stream}' - # ------------------------------- - # POD, INSTALLER, AND BRANCH MAPPING - # ------------------------------- - # CI PODs - # ------------------------------- - pod: - - baremetal: - slave-label: fuel-baremetal - <<: *master - - virtual: - slave-label: fuel-virtual - <<: *master - - baremetal: - slave-label: fuel-baremetal - <<: *fraser - - virtual: - slave-label: fuel-virtual - <<: *fraser - # ------------------------------- - # scenarios - # ------------------------------- - scenario: - # HA scenarios - - 'os-nosdn-nofeature-ha': - auto-trigger-name: 'weekly-trigger-disabled' - - jobs: - - 'fuel-{scenario}-{pod}-weekly-{stream}' - - 'fuel-deploy-{pod}-weekly-{stream}' - -######################## -# job templates -######################## -- job-template: - name: 'fuel-{scenario}-{pod}-weekly-{stream}' - - disabled: '{obj:disabled}' - - concurrent: false - - properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-os-.*?-{pod}-daily-.*' - - 'fuel-os-.*?-{pod}-weekly-.*' - - 'fuel-verify-.*' - block-level: 'NODE' - - wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - - triggers: - - '{auto-trigger-name}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults': - gs-pathname: '{gs-pathname}' - - '{slave-label}-defaults': - installer: '{installer}' - - string: - name: DEPLOY_SCENARIO - default: '{scenario}' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - trigger-builds: - - project: 'fuel-deploy-{pod}-weekly-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - same-node: true - block: true - - trigger-builds: - - project: 'functest-fuel-{pod}-weekly-{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' - - publishers: - - email-fuel-ptl - - email-jenkins-admins-on-failure - -- job-template: - name: 'fuel-deploy-{pod}-weekly-{stream}' - - disabled: '{obj:disabled}' - - concurrent: true - - properties: - - logrotate-default - - throttle: - enabled: true - max-total: 4 - max-per-node: 1 - option: 'project' - - build-blocker: - use-build-blocker: true - blocking-jobs: - - 'fuel-deploy-{pod}-daily-.*' - - 'fuel-deploy-generic-daily-.*' - - 'fuel-deploy-{pod}-weekly-.*' - - 'fuel-deploy-generic-weekly-.*' - block-level: 'NODE' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - '{installer}-defaults': - gs-pathname: '{gs-pathname}' - - '{slave-label}-defaults': - installer: '{installer}' - - testapi-parameter - - string: - name: DEPLOY_SCENARIO - default: 'os-odl-nofeature-ha' - - scm: - - git-scm - - wrappers: - - build-name: - name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - track-begin-timestamp - - shell: - !include-raw-escape: ./fuel-deploy.sh - - publishers: - - email-fuel-ptl - - email-jenkins-admins-on-failure - - report-provision-result - -######################## -# trigger macros -######################## -# ---------------------------------------------- -# Triggers for job running on fuel-baremetal against master branch -# ---------------------------------------------- -# HA Scenarios -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-baremetal-weekly-master-trigger' - triggers: - - timed: '' diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index 4e23d44fe..c82147489 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -26,14 +26,10 @@ check_os_deployment() { } - run_tiers() { tiers=$1 cmd_opt="run_tests -r -t all" [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" - ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" - echo 0 > ${ret_val_file} - for tier in ${tiers[@]}; do FUNCTEST_IMAGE=${REPO}/functest-${tier}:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." @@ -55,8 +51,6 @@ run_tiers() { run_test() { test_name=$1 cmd_opt="run_tests -t ${test_name}" - ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" - echo 0 > ${ret_val_file} # Determine which Functest image should be used for the test case case ${test_name} in connection_check|tenantnetwork1|tenantnetwork2|vmready1|vmready2|singlevm1|singlevm2|vping_ssh|vping_userdata|cinder_test|odl|api_check|snaps_health_check) @@ -158,6 +152,9 @@ fi volumes="${images_vol} ${results_vol} ${sshkey_vol} ${userconfig_vol} ${rc_file_vol} ${cacert_file_vol}" +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo 0 > ${ret_val_file} + set +e if [ ${FUNCTEST_MODE} == 'testcase' ]; then diff --git a/jjb/functest/functest-daily-jobs.yaml b/jjb/functest/functest-daily-jobs.yaml index daed74ea3..94855955c 100644 --- a/jjb/functest/functest-daily-jobs.yaml +++ b/jjb/functest/functest-daily-jobs.yaml @@ -217,7 +217,7 @@ - 'suite': job-timeout: 60 - 'daily': - job-timeout: 480 + job-timeout: 600 jobs: - 'functest-{installer}-{pod}-{testsuite}-{stream}' diff --git a/jjb/global/releng-macros.yaml b/jjb/global/releng-macros.yaml index 8055fdbdf..fe24ed56d 100644 --- a/jjb/global/releng-macros.yaml +++ b/jjb/global/releng-macros.yaml @@ -420,7 +420,7 @@ - shell: | #!/bin/bash # Install python package - sudo pip install "flake8==2.6.2" + sudo -H pip install "flake8==2.6.2" echo "Checking python code..." for f in $(egrep '\.py$' modified_files) @@ -438,7 +438,7 @@ - shell: | #!/bin/bash # sudo Install python packages - sudo pip install "yamllint==1.8.2" + sudo -H pip install "yamllint==1.8.2" echo "Checking yaml file..." for f in $(egrep '\.ya?ml$' modified_files) diff --git a/jjb/global/slave-params.yaml b/jjb/global/slave-params.yaml index 5b9ce413c..e83a10265 100644 --- a/jjb/global/slave-params.yaml +++ b/jjb/global/slave-params.yaml @@ -272,10 +272,6 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' - parameter: name: 'auto-baremetal-defaults' @@ -408,10 +404,6 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' - - string: - name: LAB_CONFIG_URL - default: ssh://jenkins-enea@gerrit.opnfv.org:29418/securedlab - description: 'Base URI to the configuration directory' - parameter: name: 'joid-virtual-defaults' diff --git a/jjb/openci/create-ane.sh b/jjb/openci/create-ane.sh deleted file mode 100755 index 8a4da8f52..000000000 --- a/jjb/openci/create-ane.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2018 Ericsson AB 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 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# This script creates ArtifactPublishedEvent -# The JMS Messaging Plugin doesn't handle the newlines well so the eventBody is -# constructed on a single line. This is something that needs to be fixed properly - -cat << EOF > $WORKSPACE/event.properties -type=$PUBLISH_EVENT_TYPE -origin=$PUBLISH_EVENT_ORIGIN -eventBody="{ 'type': '$PUBLISH_EVENT_TYPE', 'id': '$(uuidgen)', 'time': '$(date -u +%Y-%m-%d_%H:%M:%SUTC)', 'origin': '$PUBLISH_EVENT_ORIGIN', 'buildUrl': '$BUILD_URL', 'branch': 'master', 'artifactLocation': '$ARTIFACT_LOCATION', 'confidenceLevel': { $CONFIDENCE_LEVEL } }" -EOF -echo "Constructed $PUBLISH_EVENT_TYPE" -echo "--------------------------------------------" -cat $WORKSPACE/event.properties -echo "--------------------------------------------" diff --git a/jjb/openci/create-ape.sh b/jjb/openci/create-ape.sh new file mode 100755 index 000000000..7c9b46cc6 --- /dev/null +++ b/jjb/openci/create-ape.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Ericsson AB 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 +############################################################################## +set -o errexit +set -o nounset +set -o pipefail + +# workaround for https://github.com/pypa/virtualenv/issues/1029 +export PS1=${PS1:-} + +# This script creates ArtifactPublishedEvent + +git clone https://gitlab.openci.io/openci/prototypes.git +cd prototypes/federated-cicd +virtualenv openci_publish +cd openci_publish +source bin/activate +python setup.py install + +# generate event body +cat <<EOF > ./json_body.txt +{ + "type": "$PUBLISH_EVENT_TYPE", + "id": "$(uuidgen)", + "time": "$(date -u +%Y-%m-%d_%H:%M:%SUTC)", + "buildUrl": "$BUILD_URL", + "branch": "master", + "origin": "$PUBLISH_EVENT_ORIGIN", + "artifactLocation": "$ARTIFACT_LOCATION", + "confidenceLevel": "$CONFIDENCE_LEVEL" +} +EOF + +echo "Constructed $PUBLISH_EVENT_TYPE" +echo "--------------------------------------------" +cat ./json_body.txt +echo "--------------------------------------------" + +python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt + +deactivate diff --git a/jjb/openci/create-cde.sh b/jjb/openci/create-cde.sh index 8fb9f0041..9780119ce 100755 --- a/jjb/openci/create-cde.sh +++ b/jjb/openci/create-cde.sh @@ -37,11 +37,11 @@ cat <<EOF > ./json_body.txt } EOF -python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt - echo "Constructed $PUBLISH_EVENT_TYPE" echo "--------------------------------------------" cat ./json_body.txt echo "--------------------------------------------" +python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt + deactivate diff --git a/jjb/openci/create-clme.sh b/jjb/openci/create-clme.sh index 85c1a80a2..2ece019b0 100755 --- a/jjb/openci/create-clme.sh +++ b/jjb/openci/create-clme.sh @@ -34,13 +34,15 @@ cat <<EOF > ./json_body.txt "scenario": "$DEPLOY_SCENARIO", "compositionName": "$DEPLOY_SCENARIO", "compositionMetadataUrl": "$SCENARIO_METADATA_LOCATION", - "confidenceLevel": "$CONFIDENCE_LEVEL", + "confidenceLevel": "$CONFIDENCE_LEVEL" } EOF -python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt - echo "Constructed $PUBLISH_EVENT_TYPE" echo "--------------------------------------------" cat ./json_body.txt echo "--------------------------------------------" + +python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt + +deactivate diff --git a/jjb/openci/openci-odl-daily-jobs.yaml b/jjb/openci/openci-odl-daily-jobs.yaml index d80feadf6..bdaca5742 100644 --- a/jjb/openci/openci-odl-daily-jobs.yaml +++ b/jjb/openci/openci-odl-daily-jobs.yaml @@ -46,19 +46,7 @@ builders: - shell: - !include-raw-escape: ./create-ane.sh - - inject: - properties-file: "$WORKSPACE/event.properties" - - publishers: - - jms-messaging: - provider-name: openci.activemq - msg-type: Custom - msg-props: | - type=$type - origin=$origin - msg-content: - $eventBody + !include-raw-escape: ./create-ape.sh # This job gets triggered by a ConfidenceLevelModifiedEvent published # by OPNFV jobs so ODL can promote the autorelease artifact even further. @@ -78,14 +66,8 @@ triggers: - jms-messaging: provider-name: openci.activemq - selector: CI_TYPE = 'custom' - checks: - - field: origin - expected-value: 'OPNFV' - - field: type - expected-value: 'ConfidenceLevelModifiedEvent' - - field: scenario - expected-value: 'os-odl-nofeature' + selector: | + JMSType = 'ConfidenceLevelModifiedEvent' and JMSOrigin = 'OPNFV' and JMSScenario = 'os-odl-nofeature-ha' builders: - shell: | diff --git a/jjb/openci/openci-onap-daily-jobs.yaml b/jjb/openci/openci-onap-daily-jobs.yaml index 28c3e6948..88589d8ac 100644 --- a/jjb/openci/openci-onap-daily-jobs.yaml +++ b/jjb/openci/openci-onap-daily-jobs.yaml @@ -46,19 +46,7 @@ builders: - shell: - !include-raw-escape: ./create-ane.sh - - inject: - properties-file: "$WORKSPACE/event.properties" - - publishers: - - jms-messaging: - provider-name: openci.activemq - msg-type: Custom - msg-props: | - type=$type - origin=$origin - msg-content: - $eventBody + !include-raw-escape: ./create-ape.sh # This job gets triggered by a ConfidenceLevelModifiedEvent published # by OPNFV jobs so ONAP can promote the autorelease artifact even further. @@ -78,14 +66,8 @@ triggers: - jms-messaging: provider-name: openci.activemq - selector: CI_TYPE = 'custom' - checks: - - field: origin - expected-value: 'OPNFV' - - field: type - expected-value: 'ConfidenceLevelModifiedEvent' - - field: scenario - expected-value: 'k8-nosdn-onap' + selector: | + JMSType = 'ConfidenceLevelModifiedEvent' and JMSOrigin = 'OPNFV' and JMSScenario = 'k8-nosdn-onap-ha' builders: - shell: | diff --git a/jjb/openci/openci-opnfv-daily-jobs.yaml b/jjb/openci/openci-opnfv-daily-jobs.yaml index 2be30ceb4..afa8effea 100644 --- a/jjb/openci/openci-opnfv-daily-jobs.yaml +++ b/jjb/openci/openci-opnfv-daily-jobs.yaml @@ -44,7 +44,9 @@ name: SCENARIO_METADATA_LOCATION default: https://url/to/scenario/metadata/on/opnfv/artifact/repo/$BUILD_NUMBER description: 'The location of the scenario metadata' - - 'opnfv-build-defaults' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' wrappers: - credentials-binding: @@ -57,7 +59,7 @@ triggers: - jms-messaging: provider-name: openci.activemq - selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = 'ODL' + selector: JMSType = 'ArtifactPublishedEvent' and JMSOrigin = '{origin}' builders: - shell: | @@ -99,7 +101,9 @@ name: CONFIDENCE_LEVEL default: "'opnfvdaily': 'SUCCESS'" description: 'The confidence level the published artifact gained' - - 'opnfv-build-defaults' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' wrappers: - credentials-binding: diff --git a/jjb/opnfvdocs/docs-rtd.yaml b/jjb/opnfvdocs/docs-rtd.yaml index ece856903..bfb9d63ec 100644 --- a/jjb/opnfvdocs/docs-rtd.yaml +++ b/jjb/opnfvdocs/docs-rtd.yaml @@ -84,11 +84,17 @@ if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then cd docs/submodules/$GERRIT_PROJECT git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD + cd - else git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD fi + if [ -d docs/subdmodules ]; then + for project in docs/submodules/*; do + cd $project && git submodule deinit -f . && cd - + done + fi - shell: | - sudo pip install virtualenv + sudo -H pip install virtualenv virtualenv $WORKSPACE/venv . $WORKSPACE/venv/bin/activate pip install --upgrade pip diff --git a/jjb/releng/opnfv-docker.yaml b/jjb/releng/opnfv-docker.yaml index cb9d7f924..959249e9b 100644 --- a/jjb/releng/opnfv-docker.yaml +++ b/jjb/releng/opnfv-docker.yaml @@ -23,6 +23,10 @@ stream: fraser branch: 'stable/{stream}' disabled: false + pharos-tools-receivers: &pharos_tools_receivers + receivers: > + pberberian@iol.unh.edu + sbergeron@iol.unh.edu storperf-receivers: &storperf-receivers receivers: > mark.beierl@emc.com @@ -140,6 +144,21 @@ project: 'nfvbench' <<: *master <<: *other-receivers + - 'pharos-tools-laas-dashboard': + project: 'pharos-tools' + dockerdir: 'dashboard/web' + <<: *master + <<: *pharos_tools_receivers + - 'pharos-tools-laas-mq': + project: 'pharos-tools' + dockerdir: 'dashboard/rabbitmq' + <<: *master + <<: *pharos_tools_receivers + - 'pharos-tools-laas-celery': + project: 'pharos-tools' + dockerdir: 'dashboard/worker' + <<: *master + <<: *pharos_tools_receivers - 'qtip': project: 'qtip' dockerdir: '.' @@ -305,6 +324,10 @@ dockerfile: 'Dockerfile' <<: *fraser <<: *other-receivers + - 'dovetail': + project: 'dovetail' + <<: *fraser + <<: *other-receivers # yamllint enable rule:key-duplicates jobs: - "{dockerrepo}-docker-build-push-{stream}" diff --git a/jjb/releng/releng-release-create-venv.sh b/jjb/releng/releng-release-create-venv.sh index 0d5635b59..de585fdb3 100644 --- a/jjb/releng/releng-release-create-venv.sh +++ b/jjb/releng/releng-release-create-venv.sh @@ -10,7 +10,7 @@ set -e -o pipefail echo "---> Create virtualenv" -sudo pip install virtualenv +sudo -H pip install virtualenv virtualenv $WORKSPACE/venv # shellcheck source=$WORKSPACE/venv/bin/activate disable=SC1091 source $WORKSPACE/venv/bin/activate diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index 783c64ee1..58d590c27 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -41,10 +41,6 @@ elif [[ ${INSTALLER_TYPE} == 'fuel' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" sshkey="-v ${SSH_KEY}:/root/.ssh/mcp.rsa" fi -# Set iptables rule to allow forwarding return traffic for container -if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then - sudo iptables -I FORWARD -j RETURN -fi opts="--privileged=true --rm" envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ |