diff options
49 files changed, 938 insertions, 449 deletions
diff --git a/jjb/apex/apex-build.sh b/jjb/apex/apex-build.sh index 09aa716be..a8ed1f8b7 100755 --- a/jjb/apex/apex-build.sh +++ b/jjb/apex/apex-build.sh @@ -12,7 +12,7 @@ echo if echo $ARTIFACT_VERSION | grep "dev" 1> /dev/null; then GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$') export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}" - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then # build rpm export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else @@ -23,14 +23,14 @@ elif echo $BUILD_TAG | grep "csit" 1> /dev/null; then export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY" elif [ "$ARTIFACT_VERSION" == "daily" ]; then export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d") - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" fi else export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION} - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --rpms" else export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c $CACHE_DIRECTORY --iso" @@ -59,7 +59,7 @@ echo "Cache Directory Contents:" echo "-------------------------" ls -al $CACHE_DIRECTORY -if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" != 'master' ]]; then +if [[ "$BUILD_ARGS" =~ '--iso' && "$BRANCH" == 'stable/fraser' ]]; then mkdir -p /tmp/apex-iso/ rm -f /tmp/apex-iso/*.iso cp -f $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso /tmp/apex-iso/ diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh index 441bf9059..1bc727d32 100755 --- a/jjb/apex/apex-deploy.sh +++ b/jjb/apex/apex-deploy.sh @@ -29,7 +29,7 @@ if [[ "$ARTIFACT_VERSION" =~ dev ]]; then # we want to use that built in mechanism to avoid re-downloading every job # so we use a dedicated folder to hold the upstream cache UPSTREAM_CACHE=$HOME/upstream_cache - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then mkdir -p ${UPSTREAM_CACHE} RESOURCES=$UPSTREAM_CACHE else @@ -55,7 +55,7 @@ else # set to use different directory here because upon RPM removal this # directory will be wiped in daily UPSTREAM_CACHE=$HOME/upstream_cache - if [ "$BRANCH" == 'master' ]; then + if [[ "$BRANCH" != 'stable/fraser' ]]; then mkdir -p ${UPSTREAM_CACHE} RESOURCES=$UPSTREAM_CACHE else @@ -161,11 +161,6 @@ else DEPLOY_CMD="${DEPLOY_CMD} -i ${INVENTORY_FILE}" fi -if [[ "$BRANCH" == "master" ]]; then - echo "Upstream deployment detected" - DEPLOY_CMD="${DEPLOY_CMD} --upstream" -fi - if [ "$IPV6_FLAG" == "True" ]; then NETWORK_FILE="${NETWORK_SETTINGS_DIR}/network_settings_v6.yaml" elif [[ "$PROMOTE" == "True" ]]; then diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index e1e51b3b6..10efbe1a2 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -18,8 +18,8 @@ else fi if [[ "$ARTIFACT_VERSION" =~ dev ]]; then - if [ "$BRANCH" == 'master' ]; then - echo "Skipping download of artifacts for master branch" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + echo "Skipping download of artifacts for master/gambia branch" else # dev build GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$') diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh index f34937619..c29d7cb32 100755 --- a/jjb/apex/apex-iso-verify.sh +++ b/jjb/apex/apex-iso-verify.sh @@ -8,8 +8,8 @@ echo "Starting the Apex iso verify." echo "--------------------------------------------------------" echo -if [ "$BRANCH" == 'master' ]; then - echo "Skipping Apex iso verify for master branch" +if [ "$BRANCH" != 'stable/fraser' ]; then + echo "Skipping Apex iso verify for ${BRANCH} branch" exit 0 fi diff --git a/jjb/apex/apex-project-jobs.yaml b/jjb/apex/apex-project-jobs.yaml index 700ff60e8..540b1ac79 100644 --- a/jjb/apex/apex-project-jobs.yaml +++ b/jjb/apex/apex-project-jobs.yaml @@ -9,6 +9,11 @@ gs-pathname: '' concurrent-builds: 3 disabled: false + - gambia: &gambia + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + concurrent-builds: 3 + disabled: false - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 5c777a824..07198b188 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -114,8 +114,8 @@ fi if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then uploadsnap elif [ "$ARTIFACT_TYPE" == 'iso' ]; then - if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" == 'master' ]]; then - echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/master build" + if [[ "$ARTIFACT_VERSION" =~ dev || "$BRANCH" != 'stable/fraser' ]]; then + echo "Skipping ISO artifact upload for ${ARTIFACT_TYPE} due to dev/${BRANCH} build" exit 0 fi if [[ -n "$SIGN_ARTIFACT" && "$SIGN_ARTIFACT" == "true" ]]; then @@ -124,8 +124,8 @@ elif [ "$ARTIFACT_TYPE" == 'iso' ]; then uploadiso elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then if [[ "$ARTIFACT_VERSION" =~ dev ]]; then - if [ "$BRANCH" == 'master' ]; then - echo "will not upload artifacts, master uses upstream" + if [[ "$BRANCH" != 'stable/fraser' ]]; then + echo "will not upload artifacts, ${BRANCH} uses upstream" ARTIFACT_TYPE=none else echo "dev build detected, will upload image tarball" @@ -138,7 +138,7 @@ elif [ "$ARTIFACT_TYPE" == 'rpm' ]; then RPM_LIST=$RPM_INSTALL_PATH/$(basename $OPNFV_RPM_URL) SRPM_INSTALL_PATH=$BUILD_DIRECTORY SRPM_LIST=$SRPM_INSTALL_PATH/$(basename $OPNFV_SRPM_URL) - if [ "$BRANCH" != 'master' ]; then + if [[ "$BRANCH" == 'stable/fraser' ]]; then VERSION_EXTENSION=$(echo $(basename $OPNFV_RPM_URL) | sed 's/opnfv-apex-//') RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-undercloud-${VERSION_EXTENSION}" RPM_LIST+=" ${RPM_INSTALL_PATH}/python34-opnfv-apex-${VERSION_EXTENSION}" diff --git a/jjb/apex/apex-verify-jobs.yaml b/jjb/apex/apex-verify-jobs.yaml index f0f99fc78..fdcd1223e 100644 --- a/jjb/apex/apex-verify-jobs.yaml +++ b/jjb/apex/apex-verify-jobs.yaml @@ -12,6 +12,11 @@ gs-pathname: '' verify-scenario: 'os-nosdn-nofeature-noha' disabled: false + - gambia: &gambia + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + verify-scenario: 'os-nosdn-nofeature-ha' + disabled: false - fraser: &fraser branch: 'stable/{stream}' gs-pathname: '/{stream}' diff --git a/jjb/apex/apex.yaml b/jjb/apex/apex.yaml index fd0e8269c..958702a17 100644 --- a/jjb/apex/apex.yaml +++ b/jjb/apex/apex.yaml @@ -30,6 +30,16 @@ scenario_stream: 'master' disable_daily: false disable_promote: false + - gambia: &gambia + branch: 'stable/gambia' + gs-pathname: '/gambia' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-nosdn-nofeature-ha' + scenario_stream: 'gambia' + disable_daily: false + disable_promote: true - fraser: &fraser branch: 'stable/fraser' gs-pathname: '/fraser' @@ -68,6 +78,28 @@ - 'os-odl-bgpvpn-ha': <<: *fraser - 'os-nosdn-nofeature-noha': + <<: *gambia + - 'os-nosdn-nofeature-ha': + <<: *gambia + - 'os-nosdn-nofeature-ha-ipv6': + <<: *gambia + - 'os-odl-nofeature-noha': + <<: *gambia + - 'os-odl-nofeature-ha': + <<: *gambia + - 'k8s-nosdn-nofeature-noha': + <<: *gambia + - 'os-odl-bgpvpn-ha': + <<: *gambia + - 'os-odl-bgpvpn-noha': + <<: *gambia + - 'os-odl-sfc-ha': + <<: *gambia + - 'os-odl-sfc-noha': + <<: *gambia + - 'os-nosdn-calipso-noha': + <<: *gambia + - 'os-nosdn-nofeature-noha': <<: *danube - 'os-nosdn-nofeature-ha': <<: *danube @@ -129,15 +161,15 @@ <<: *master - 'os-odl-nofeature-ha': <<: *master - - 'os-nosdn-queens-noha': + - 'os-nosdn-rocky-noha': <<: *master - - 'os-nosdn-queens-ha': + - 'os-nosdn-rocky-ha': <<: *master - 'os-nosdn-queens-ha-ipv6': <<: *master - - 'os-odl-queens-noha': + - 'os-odl-rocky-noha': <<: *master - - 'os-odl-queens-ha': + - 'os-odl-rocky-ha': <<: *master - 'k8s-nosdn-nofeature-noha': <<: *master @@ -153,13 +185,13 @@ <<: *master - 'os-odl-sfc-noha': <<: *master - - 'os-odl-sfc_queens-ha': + - 'os-odl-sfc_rocky-ha': <<: *master - - 'os-odl-sfc_queens-noha': + - 'os-odl-sfc_rocky-noha': <<: *master - 'os-nosdn-calipso-noha': <<: *master - - 'os-nosdn-calipso_queens-noha': + - 'os-nosdn-calipso_rocky-noha': <<: *master - 'os-nosdn-nofeature-noha': <<: *euphrates @@ -207,6 +239,9 @@ - 'queens': os_scenario: 'queens' odl_branch: 'stable/oxygen' + - 'rocky': + os_scenario: 'rocky' + odl_branch: 'stable/fluorine' - 'master': os_scenario: 'nofeature' odl_branch: 'stable/oxygen' @@ -1274,6 +1309,103 @@ abort-all-job: true git-revision: false +# gambia Builder +- builder: + name: apex-builder-gambia + builders: + - multijob: + name: Baremetal Deploy and Test Phase + condition: SUCCESSFUL + projects: + - name: 'apex-os-nosdn-nofeature-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-nofeature-ha-ipv6-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-nofeature-ha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-k8s-nosdn-nofeature-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-bgpvpn-ha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-bgpvpn-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-ha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-odl-sfc-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + - name: 'apex-os-nosdn-calipso-noha-baremetal-gambia' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false + # danube Builder - builder: name: apex-builder-danube @@ -1539,7 +1671,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-queens-noha-baremetal-master' + - name: 'apex-os-nosdn-rocky-noha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1547,7 +1679,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-queens-ha-baremetal-master' + - name: 'apex-os-nosdn-rocky-ha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1563,7 +1695,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-queens-noha-baremetal-master' + - name: 'apex-os-odl-rocky-noha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1571,7 +1703,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-queens-ha-baremetal-master' + - name: 'apex-os-odl-rocky-ha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1635,7 +1767,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-sfc_queens-ha-baremetal-master' + - name: 'apex-os-odl-sfc_rocky-ha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1643,7 +1775,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-sfc_queens-noha-baremetal-master' + - name: 'apex-os-odl-sfc_rocky-noha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1659,7 +1791,7 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-nosdn-calipso_queens-noha-baremetal-master' + - name: 'apex-os-nosdn-calipso_rocky-noha-baremetal-master' node-parameters: false current-parameters: false predefined-parameters: | @@ -1838,6 +1970,7 @@ ####################### # trigger macros +# timed is in format: 'min hour daymonth month dayweek' ######################## - trigger: name: 'apex-master' @@ -1845,6 +1978,11 @@ - timed: '0 0 1-31/2 * *' - trigger: + name: 'apex-gambia' + triggers: + - timed: '0 4 2-30/2 * *' + +- trigger: name: 'apex-fraser' triggers: - timed: '0 0 2-30/2 * *' diff --git a/jjb/apex/apex.yaml.j2 b/jjb/apex/apex.yaml.j2 index 31e3bd8f3..33373d665 100644 --- a/jjb/apex/apex.yaml.j2 +++ b/jjb/apex/apex.yaml.j2 @@ -30,6 +30,16 @@ scenario_stream: 'master' disable_daily: false disable_promote: false + - gambia: &gambia + branch: 'stable/gambia' + gs-pathname: '/gambia' + build-slave: 'apex-build-master' + virtual-slave: 'apex-virtual-master' + baremetal-slave: 'apex-baremetal-master' + verify-scenario: 'os-nosdn-nofeature-ha' + scenario_stream: 'gambia' + disable_daily: false + disable_promote: true - fraser: &fraser branch: 'stable/fraser' gs-pathname: '/fraser' @@ -81,6 +91,9 @@ - 'queens': os_scenario: 'queens' odl_branch: 'stable/oxygen' + - 'rocky': + os_scenario: 'rocky' + odl_branch: 'stable/fluorine' - 'master': os_scenario: 'nofeature' odl_branch: 'stable/oxygen' @@ -1169,6 +1182,7 @@ ####################### # trigger macros +# timed is in format: 'min hour daymonth month dayweek' ######################## - trigger: name: 'apex-master' @@ -1176,6 +1190,11 @@ - timed: '0 0 1-31/2 * *' - trigger: + name: 'apex-gambia' + triggers: + - timed: '0 4 2-30/2 * *' + +- trigger: name: 'apex-fraser' triggers: - timed: '0 0 2-30/2 * *' diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index 1e1ba3fc3..343cf611f 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -4,11 +4,11 @@ master: - 'os-nosdn-nofeature-ha-ipv6' - 'os-odl-nofeature-noha' - 'os-odl-nofeature-ha' - - 'os-nosdn-queens-noha' - - 'os-nosdn-queens-ha' + - 'os-nosdn-rocky-noha' + - 'os-nosdn-rocky-ha' - 'os-nosdn-queens-ha-ipv6' - - 'os-odl-queens-noha' - - 'os-odl-queens-ha' + - 'os-odl-rocky-noha' + - 'os-odl-rocky-ha' - 'k8s-nosdn-nofeature-noha' - 'os-odl-bgpvpn-ha' - 'os-odl-bgpvpn-noha' @@ -16,10 +16,22 @@ master: - 'os-odl-bgpvpn_queens-noha' - 'os-odl-sfc-ha' - 'os-odl-sfc-noha' - - 'os-odl-sfc_queens-ha' - - 'os-odl-sfc_queens-noha' + - 'os-odl-sfc_rocky-ha' + - 'os-odl-sfc_rocky-noha' + - 'os-nosdn-calipso-noha' + - 'os-nosdn-calipso_rocky-noha' +gambia: + - 'os-nosdn-nofeature-noha' + - 'os-nosdn-nofeature-ha' + - 'os-nosdn-nofeature-ha-ipv6' + - 'os-odl-nofeature-noha' + - 'os-odl-nofeature-ha' + - 'k8s-nosdn-nofeature-noha' + - 'os-odl-bgpvpn-ha' + - 'os-odl-bgpvpn-noha' + - 'os-odl-sfc-ha' + - 'os-odl-sfc-noha' - 'os-nosdn-calipso-noha' - - 'os-nosdn-calipso_queens-noha' fraser: - 'os-nosdn-nofeature-ha' - 'os-odl-bgpvpn-ha' diff --git a/jjb/armband/armband-ci-jobs.yaml b/jjb/armband/armband-ci-jobs.yaml index 666a0f596..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}' @@ -283,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: @@ -291,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 # -------------------------------------------------------------- @@ -355,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 171808367..57d80aeac 100644 --- a/jjb/armband/armband-verify-jobs.yaml +++ b/jjb/armband/armband-verify-jobs.yaml @@ -12,7 +12,7 @@ branch: '{stream}' gs-pathname: '' disabled: false - - fraser: + - gambia: branch: 'stable/{stream}' gs-pathname: '/{stream}' disabled: false 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 ed636b849..065d20128 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -213,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 73d33d63b..c2a3dd7ca 100644 --- a/jjb/fuel/fuel-daily-jobs.yaml +++ b/jjb/fuel/fuel-daily-jobs.yaml @@ -21,6 +21,11 @@ branch: 'stable/{stream}' disabled: false gs-pathname: '/{stream}' + gambia: &gambia + stream: gambia + branch: 'stable/{stream}' + disabled: false + gs-pathname: '/{stream}' # ------------------------------- # POD, INSTALLER, AND BRANCH MAPPING # ------------------------------- @@ -35,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 @@ -65,6 +73,8 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-odl-nofeature-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - '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': @@ -75,12 +85,25 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' exclude: + # 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-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: fraser jobs: - 'fuel-{scenario}-{pod}-daily-{stream}' @@ -140,28 +163,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: 'fraser' + 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: 'fraser' + 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.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 @@ -173,6 +210,9 @@ - condition-kind: regex-match regex: '.*-ha' label: '{scenario}' + - condition-kind: regex-match + regex: 'fraser' + label: '{stream}' steps: - trigger-builds: - project: 'dovetail-fuel-{pod}-default-mandatory-{stream}' @@ -191,6 +231,9 @@ - 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}' @@ -347,6 +390,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-odl-sfc-noha-baremetal-daily-master-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-master-trigger' triggers: - timed: '' @@ -363,40 +410,56 @@ 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' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '0 20 * * 1,3,7' + - timed: '0 20 * * *' - trigger: - name: 'fuel-os-odl-nofeature-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-odl-nofeature-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '' # '0 2 * * *' + - 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-nosdn-ovs-ha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-gambia-trigger' triggers: - - timed: '' # '0 20 * * *' + - timed: '0 5 * * *' +- trigger: + name: 'fuel-os-nosdn-vpp-ha-baremetal-daily-gambia-trigger' + triggers: + - timed: '' # NOHA Scenarios - trigger: - name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-nosdn-nofeature-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl-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-ovs-noha-baremetal-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-gambia-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl-ovs-noha-baremetal-daily-gambia-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-ovs-noha-baremetal-daily-gambia-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-nosdn-vpp-noha-baremetal-daily-gambia-trigger' triggers: - timed: '' # ---------------------------------------------- @@ -432,6 +495,10 @@ triggers: - timed: '5 18 * * *' - trigger: + name: 'fuel-os-odl-sfc-noha-virtual-daily-master-trigger' + triggers: + - timed: '5 4 * * *' +- trigger: name: 'fuel-os-ovn-nofeature-noha-virtual-daily-master-trigger' triggers: - timed: '5 23 * * *' @@ -448,41 +515,72 @@ 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' + name: 'fuel-os-nosdn-nofeature-ha-baremetal-daily-fraser-trigger' + triggers: + - timed: '5 13 * * 6,7' +- trigger: + name: 'fuel-os-odl-nofeature-ha-baremetal-daily-fraser-trigger' + triggers: + - timed: '0 13 * * 6' +- trigger: + name: 'fuel-os-nosdn-ovs-ha-baremetal-daily-fraser-trigger' + triggers: + - timed: '0 13 * * 7' +# ---------------------------------------------- +# Triggers for job running on fuel-virtual against gambia branch +# ---------------------------------------------- +- trigger: + name: 'fuel-os-nosdn-nofeature-ha-virtual-daily-gambia-trigger' + triggers: + - timed: '' +- trigger: + name: 'fuel-os-odl-nofeature-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-odl-nofeature-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-ovn-nofeature-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-ovn-nofeature-ha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-ha-virtual-daily-gambia-trigger' triggers: - timed: '' - trigger: - name: 'fuel-os-nosdn-ovs-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-ovn-nofeature-noha-virtual-daily-gambia-trigger' + triggers: + - timed: '0 23 * * *' +- trigger: + name: 'fuel-os-odl-ovs-noha-virtual-daily-gambia-trigger' + triggers: + - timed: '0 2 * * *' - trigger: - name: 'fuel-os-nosdn-ovs-noha-virtual-daily-fraser-trigger' + name: 'fuel-os-nosdn-ovs-noha-virtual-daily-gambia-trigger' triggers: - - timed: '' # '0 9 * * *' + - timed: '0 9 * * *' +- trigger: + name: 'fuel-os-nosdn-vpp-noha-virtual-daily-gambia-trigger' + triggers: + - timed: '' # ---------------------------------------------- # ZTE POD1 Triggers running against master branch # ---------------------------------------------- @@ -516,6 +614,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-odl-sfc-noha-zte-pod1-daily-master-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-ovn-nofeature-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh index 9d71f0833..c0cdc3dc2 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -19,38 +19,30 @@ LAB_NAME=${NODE_NAME/-*} # shellcheck disable=SC2153 POD_NAME=${NODE_NAME/*-} -# 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 # 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 \ +DEPLOY_COMMAND="${WORKSPACE}/ci/deploy.sh \ -l ${LAB_NAME} -p ${POD_NAME} -s ${DEPLOY_SCENARIO} \ - -S ${TMPDIR} \ + -S ${TMPDIR} ${EXTRA_ARGS:-} \ -L ${WORKSPACE}/${FUEL_LOG_FILENAME}" # log info to console 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-project-jobs.yaml b/jjb/fuel/fuel-project-jobs.yaml index 7d7e4593a..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 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/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 e83a10265..023d2dd0b 100644 --- a/jjb/global/slave-params.yaml +++ b/jjb/global/slave-params.yaml @@ -20,6 +20,21 @@ description: 'SSH key to use for Apex' - parameter: + name: 'apex-baremetal-gambia-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-baremetal-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + +- parameter: name: 'apex-baremetal-fraser-defaults' parameters: - label: @@ -81,6 +96,21 @@ description: 'SSH key to use for Apex' - parameter: + name: 'apex-virtual-gambia-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'apex-virtual-master' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + +- parameter: name: 'apex-virtual-fraser-defaults' parameters: - label: 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 7f48fcc06..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' - - 'ericsson-build4-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' - - 'ericsson-build4-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 47c3ce4b8..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: '.' 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/stor4nfv/stor4nfv-jobs.yaml b/jjb/stor4nfv/stor4nfv-jobs.yaml new file mode 100644 index 000000000..29af9ffbd --- /dev/null +++ b/jjb/stor4nfv/stor4nfv-jobs.yaml @@ -0,0 +1,12 @@ +--- +- project: + name: stor4nfv-docs + project: 'stor4nfv' + project-name: 'stor4nfv' + + project-pattern: 'stor4nfv' + rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfv-stor4nfv/47394/' + rtd-token: '9c189b44cf08de75dc06253558cc86ed93982cbb' + + jobs: + - '{project-name}-rtd-jobs' diff --git a/modules/opnfv/deployment/example.py b/modules/opnfv/deployment/example.py index 52d9b5630..1e54321c7 100644 --- a/modules/opnfv/deployment/example.py +++ b/modules/opnfv/deployment/example.py @@ -23,15 +23,17 @@ print(handler.get_deployment_info()) print("########## FUEL ##########") +# NOTE: If you get traces containing <paramiko.ecdsakey.ECDSAKey object [...]> +# make sure 10.20.0.2 is not already in ~/.ssh/known_hosts with another sig handler = factory.Factory.get_handler('fuel', '10.20.0.2', - 'root', - installer_pwd='r00tme') + 'ubuntu', + pkey_file='/var/lib/opnfv/mcp.rsa') print(handler.get_deployment_info()) -print("List of nodes in cluster 4:") -nodes = handler.get_nodes({'cluster': '4'}) +print("List of nodes in cluster") +nodes = handler.get_nodes() for node in nodes: print(node) diff --git a/modules/opnfv/deployment/factory.py b/modules/opnfv/deployment/factory.py index 1fd8d447b..cd2fc3645 100644 --- a/modules/opnfv/deployment/factory.py +++ b/modules/opnfv/deployment/factory.py @@ -42,7 +42,7 @@ class Factory(object): elif installer.lower() == "fuel": return fuel_adapter.FuelAdapter(installer_ip=installer_ip, installer_user=installer_user, - installer_pwd=installer_pwd) + pkey_file=pkey_file) elif installer.lower() == "compass": return compass_adapter.ContainerizedCompassAdapter( installer_ip=installer_ip, diff --git a/modules/opnfv/deployment/fuel/adapter.py b/modules/opnfv/deployment/fuel/adapter.py index a217767ba..a57168d0e 100644 --- a/modules/opnfv/deployment/fuel/adapter.py +++ b/modules/opnfv/deployment/fuel/adapter.py @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2017 Ericsson AB and others. +# Copyright (c) 2018 Ericsson AB and others. # Author: Jose Lausuch (jose.lausuch@ericsson.com) # George Paraskevopoulos (geopar@intracom-telecom.com) # All rights reserved. This program and the accompanying materials @@ -7,193 +7,129 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +''' + This modules implements the Fuel@OPNFV adapter + - host executing this module needs network connectivity to a cluster via: + * mcpcontrol network (usually 10.20.0.0/24, created by installer); + * PXE/admin network; + The above are always true for an OPNFV Pharos jumpserver. + - key-based SSH auth is used throughout the cluster, without proxy-ing + cluster node access via Salt master (old Fuel@OPNFV used to); +''' + +from yaml import safe_load, YAMLError from opnfv.deployment import manager from opnfv.utils import opnfv_logger as logger from opnfv.utils import ssh_utils -logger = logger.Logger(__name__).getLogger() +LOGGER = logger.Logger(__name__).getLogger() class FuelAdapter(manager.DeploymentHandler): + ''' + This class extends the generic handler with Fuel@OPNFV specifics + ''' - def __init__(self, installer_ip, installer_user, installer_pwd): + def __init__(self, installer_ip, installer_user, pkey_file): super(FuelAdapter, self).__init__(installer='fuel', installer_ip=installer_ip, installer_user=installer_user, - installer_pwd=installer_pwd, - pkey_file=None) - - def _get_clusters(self): - environments = [] - output = self.runcmd_fuel_env() - lines = output.rsplit('\n') - if len(lines) < 2: - logger.info("No environments found in the deployment.") - return None - else: - fields = lines[0].rsplit(' | ') - - index_id = -1 - index_status = -1 - index_name = -1 - index_release_id = -1 - - for i in range(len(fields)): - if "id" in fields[i]: - index_id = i - elif "status" in fields[i]: - index_status = i - elif "name" in fields[i]: - index_name = i - elif "release_id" in fields[i]: - index_release_id = i - - # order env info - for i in range(2, len(lines)): - fields = lines[i].rsplit(' | ') - dict = {"id": fields[index_id].strip(), - "status": fields[index_status].strip(), - "name": fields[index_name].strip(), - "release_id": fields[index_release_id].strip()} - environments.append(dict) - - return environments + installer_pwd=None, + pkey_file=pkey_file) def get_nodes(self, options=None): - - if options and options['cluster'] and len(self.nodes) > 0: - n = [] - for node in self.nodes: - if str(node.info['cluster']) == str(options['cluster']): - n.append(node) - return n - + ''' + Generates a list of all the nodes in the deployment + ''' + # Unlike old Fuel@Openstack, we don't keep track of different clusters + # explicitly, but through domain names. + # For simplicity, we will assume a single cluster per Salt master node. try: # if we have retrieved previously all the nodes, don't do it again # This fails the first time when the constructor calls this method # therefore the try/except if len(self.nodes) > 0: return self.nodes + # pylint: disable=bare-except except: pass + # Manager roles to reclass properties mapping + _map = { + 'salt:master:enabled': manager.Role.INSTALLER, + 'maas:region:enabled': manager.Role.INSTALLER, + 'nova:controller:enabled': manager.Role.CONTROLLER, + 'nova:compute:enabled': manager.Role.COMPUTE, + 'opendaylight:server:enabled': manager.Role.ODL, + } nodes = [] - cmd = 'fuel node' + cmd = ("sudo salt '*' pillar.item {} --out yaml --static 2>/dev/null" + .format(' '.join(_map.keys() + ['_param:pxe_admin_address']))) + # Sample output (for one node): + # cmp001.mcp-ovs-noha.local: + # _param:pxe_admin_address: 192.168.11.34 + # maas:region:enabled: '' + # nova:compute:enabled: true + # nova:controller:enabled: '' + # opendaylight:server:enabled: '' + # retcode: 0 + # salt:master:enabled: '' output = self.installer_node.run_cmd(cmd) - lines = output.rsplit('\n') - if len(lines) < 2: - logger.info("No nodes found in the deployment.") + if output.startswith('No minions matched the target'): + LOGGER.info('No nodes found in the deployment.') return nodes - # get fields indexes - fields = lines[0].rsplit(' | ') - - index_id = -1 - index_status = -1 - index_name = -1 - index_cluster = -1 - index_ip = -1 - index_mac = -1 - index_roles = -1 - index_online = -1 - - for i in range(len(fields)): - if "group_id" in fields[i]: - break - elif "id" in fields[i]: - index_id = i - elif "status" in fields[i]: - index_status = i - elif "name" in fields[i]: - index_name = i - elif "cluster" in fields[i]: - index_cluster = i - elif "ip" in fields[i]: - index_ip = i - elif "mac" in fields[i]: - index_mac = i - elif "roles " in fields[i] and "pending_roles" not in fields[i]: - index_roles = i - elif "online" in fields[i]: - index_online = i - - # order nodes info - for i in range(2, len(lines)): - fields = lines[i].rsplit(' | ') - id = fields[index_id].strip().encode() - ip = fields[index_ip].strip().encode() - status_node = fields[index_status].strip().encode().lower() - name = fields[index_name].strip().encode() - roles_all = fields[index_roles].strip().encode().lower() - - roles = [x for x in [manager.Role.CONTROLLER, - manager.Role.COMPUTE, - manager.Role.ODL] if x in roles_all] - - dict = {"cluster": fields[index_cluster].strip().encode(), - "mac": fields[index_mac].strip().encode(), - "status_node": status_node, - "online": fields[index_online].strip().encode()} - - ssh_client = None - if status_node == 'ready': - status = manager.NodeStatus.STATUS_OK - proxy = {'ip': self.installer_ip, - 'username': self.installer_user, - 'password': self.installer_pwd} - ssh_client = ssh_utils.get_ssh_client(hostname=ip, - username='root', - proxy=proxy) - elif 'error' in status_node: - status = manager.NodeStatus.STATUS_ERROR - elif 'off' in status_node: - status = manager.NodeStatus.STATUS_OFFLINE - elif 'discover' in status_node: - status = manager.NodeStatus.STATUS_UNUSED - else: - status = manager.NodeStatus.STATUS_INACTIVE - + try: + yaml_output = safe_load(output) + except YAMLError as exc: + LOGGER.error(exc) + for node_name in yaml_output.keys(): + ip_addr = yaml_output[node_name]['_param:pxe_admin_address'] + ssh_client = ssh_utils.get_ssh_client(hostname=ip_addr, + username='ubuntu', + pkey_file=self.pkey_file) node = manager.Node( - id, ip, name, status, roles, ssh_client, dict) - if options and options['cluster']: - if fields[index_cluster].strip() == options['cluster']: - nodes.append(node) - else: - nodes.append(node) + id=node_name, + ip=ip_addr, + name=node_name, + status=manager.NodeStatus.STATUS_OK, + roles=[_map[x] for x in _map if yaml_output[node_name][x]], + ssh_client=ssh_client) + nodes.append(node) - self.get_nodes_called = True return nodes def get_openstack_version(self): - cmd = 'source openrc;nova-manage version 2>/dev/null' - version = None - for node in self.nodes: - if node.is_controller() and node.is_active(): - version = node.run_cmd(cmd) - break - return version + ''' + Returns a string of the openstack version (nova-compute) + ''' + cmd = ("sudo salt -C 'I@nova:controller and *01*' " + "cmd.run 'nova-manage version 2>/dev/null' --out yaml --static") + nova_version = self.installer_node.run_cmd(cmd) + if nova_version: + return nova_version.split(' ')[-1] + return None def get_sdn_version(self): - cmd = "apt-cache policy opendaylight|grep Installed" + ''' + Returns a string of the sdn controller and its version, if exists + ''' + cmd = ("sudo salt -C 'I@opendaylight:server and *01*'" + "pkg.version opendaylight --out yaml --static") version = None for node in self.nodes: if manager.Role.ODL in node.roles and node.is_active(): - odl_version = node.run_cmd(cmd) + odl_version = self.installer_node.run_cmd(cmd) if odl_version: version = 'OpenDaylight ' + odl_version.split(' ')[-1] break return version def get_deployment_status(self): - cmd = "fuel env|tail -1|awk '{print $3}'" - result = self.installer_node.run_cmd(cmd) - if result is None or len(result) == 0: - return 'unknown' - elif 'operational' in result: - return 'active' - elif 'deploy' in result: - return 'deploying' - else: - return 'active' + ''' + Returns a string of the status of the deployment + ''' + # NOTE: Requires Fuel-side signaling of deployment status, stub it + return 'active' diff --git a/modules/opnfv/deployment/manager.py b/modules/opnfv/deployment/manager.py index 694df7755..2b5aedbc7 100644 --- a/modules/opnfv/deployment/manager.py +++ b/modules/opnfv/deployment/manager.py @@ -241,13 +241,13 @@ class Node(object): Returns the ovs version installed ''' if self.is_active(): - cmd = "ovs-vsctl --version|head -1| sed 's/^.*) //'" - return self.run_cmd(cmd) + cmd = "ovs-vsctl --version 2>/dev/null|head -1| sed 's/^.*) //'" + return self.run_cmd(cmd) or None return None def get_system_info(self): ''' - Returns the ovs version installed + Returns system information ''' cmd = 'grep MemTotal /proc/meminfo' memory = self.run_cmd(cmd).partition('MemTotal:')[-1].strip().encode() diff --git a/modules/opnfv/utils/Credentials.py b/modules/opnfv/utils/Credentials.py index 141ecbd93..193a10aac 100644 --- a/modules/opnfv/utils/Credentials.py +++ b/modules/opnfv/utils/Credentials.py @@ -7,9 +7,9 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 # -# Usage example: +# Usage example (note: Fuel actually uses key-based auth, not user/pass): # from opnfv.utils.Credentials import Credentials as credentials -# credentials("fuel", "10.20.0.2", "root", "r00tme").fetch('./openrc') +# credentials("fuel", "10.20.0.2", "user", "password").fetch('./openrc') # import os @@ -74,12 +74,7 @@ class Credentials(object): pass def __fetch_creds_fuel(self, target_path): - creds_file = '/root/openrc' - try: - self.handler.get_file_from_controller(creds_file, target_path) - except Exception as e: - self.logger.error( - "Cannot get %s from controller. %e" % (creds_file, e)) + # TODO pass def __fetch_creds_joid(self, target_path): diff --git a/modules/opnfv/utils/ssh_utils.py b/modules/opnfv/utils/ssh_utils.py index 175a38078..22727170b 100644 --- a/modules/opnfv/utils/ssh_utils.py +++ b/modules/opnfv/utils/ssh_utils.py @@ -49,10 +49,11 @@ def get_ssh_client(hostname, client = paramiko.SSHClient() else: client = ProxyHopClient() + proxy_password = proxy.get('password', None) proxy_pkey_file = proxy.get('pkey_file', '/root/.ssh/id_rsa') client.configure_jump_host(proxy['ip'], proxy['username'], - proxy['password'], + proxy_password, proxy_pkey_file) if client is None: raise Exception('Could not connect to client') diff --git a/modules/requirements.txt b/modules/requirements.txt index 0718fa3b0..2c51daaea 100644 --- a/modules/requirements.txt +++ b/modules/requirements.txt @@ -1,3 +1,4 @@ paramiko>=2.0 # LGPLv2.1+ mock>=2.0 # BSD requests>=2.14.2 # Apache-2.0 +pyyaml>=3.11 # MIT diff --git a/releases/gambia/apex.yaml b/releases/gambia/apex.yaml new file mode 100644 index 000000000..fada4cbb1 --- /dev/null +++ b/releases/gambia/apex.yaml @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 The Linux Foundation 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 +############################################################################## +--- +project: apex +project-type: installer +release-model: stable +upstream: https://wiki.openstack.org/wiki/TripleO + +branches: + - name: stable/gambia + location: + apex: 82bf9da27ea0c973068720d440e3391084e8a9d9 diff --git a/releases/gambia/auto.yaml b/releases/gambia/auto.yaml new file mode 100644 index 000000000..f53a41131 --- /dev/null +++ b/releases/gambia/auto.yaml @@ -0,0 +1,9 @@ +--- +project: auto +project-type: feature +release-model: stable + +branches: + - name: stable/gambia + location: + auto: 1a2260efe5d15f95b8fa778a9ee8023121facd7e diff --git a/releases/gambia/compass4nfv.yaml b/releases/gambia/compass4nfv.yaml new file mode 100644 index 000000000..e0523889c --- /dev/null +++ b/releases/gambia/compass4nfv.yaml @@ -0,0 +1,12 @@ +--- +project: compass4nfv +project-type: installer +release-model: stable + +branches: + - name: stable/gambia + location: + compass4nfv: 33f94b43639dbe37b7e8e2b5eeb4c65064207c6b + - name: stable/gambia + location: + compass-containers: 20e229822b31b03e1120c3e5efd4ba131261617e diff --git a/releases/gambia/doctor.yaml b/releases/gambia/doctor.yaml new file mode 100644 index 000000000..3294fec6f --- /dev/null +++ b/releases/gambia/doctor.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Nokia Corporation 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 +############################################################################## +--- +project: doctor +project-type: feature +release-model: stable + +releases: + - version: opnfv-7.0.0 + location: + doctor: 3ddc2392b0ed364eede49ff006d64df3ea456350 + +branches: + - name: stable/gambia + location: + doctor: 3ddc2392b0ed364eede49ff006d64df3ea456350 diff --git a/releases/gambia/ipv6.yaml b/releases/gambia/ipv6.yaml new file mode 100644 index 000000000..a566e547c --- /dev/null +++ b/releases/gambia/ipv6.yaml @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 The Linux Foundation 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 +############################################################################## +--- +project: ipv6 +project-type: feature +release-model: stable + +branches: + - name: stable/gambia + location: + ipv6: e36f753cf6e9ab0c02a400b6bac5c79b48268d44 diff --git a/releases/gambia/samplevnf.yaml b/releases/gambia/samplevnf.yaml new file mode 100644 index 000000000..1727730bc --- /dev/null +++ b/releases/gambia/samplevnf.yaml @@ -0,0 +1,9 @@ +--- +project: samplevnf +project-type: feature +release-model: stable + +branches: + - name: stable/gambia + location: + samplevnf: 4d59d3530d1c41734f15423142e64eb9c929c717 diff --git a/releases/gambia/yardstick.yaml b/releases/gambia/yardstick.yaml new file mode 100644 index 000000000..3c782c432 --- /dev/null +++ b/releases/gambia/yardstick.yaml @@ -0,0 +1,9 @@ +--- +project: yardstick +project-type: testing +release-model: stable + +branches: + - name: stable/gambia + location: + yardstick: 497292013ef0d7e1e014d76803d4f284618b4986 |