Clone and setup the repo::
- git clone ssh://YOU@gerrit.opnfv.org:29418/releng
+ git clone --recursive ssh://YOU@gerrit.opnfv.org:29418/releng
cd releng
git review -s
Test with tox::
- tox -v -ejjb
+ tox -e jjb
.. note:: You can also test the jobs under a single jjb directory by
specifying the directory. For example to test only the releng jobs, you
could run:
- tox -v -e jjb -- jjb/releng
+ tox -e jjb -- jjb/global:jjb/global-jjb:jjb/releng
Submit the change to gerrit::
+++ /dev/null
----
-- project:
- name: 'releng-sandbox-jobs'
- jobs:
- - 'releng-deploy-sandbox'
-
- project: 'releng'
- node: 'releng-sandbox'
-
-- job-template:
- name: 'releng-deploy-sandbox'
- node: '{node}'
-
- parameters:
- - project-parameter:
- project: '{project}'
- branch: 'master'
- scm:
- - git-scm-gerrit
-
- triggers:
- - gerrit:
- trigger-on:
- - patchset-created-event:
- exclude-drafts: 'false'
- exclude-trivial-rebase: 'false'
- exclude-no-code-change: 'false'
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: 'redeploy'
- custom-url: '$BUILD_URL deploying to $JENKINS_URL'
- silent-start: true
- skip-vote:
- successful: true
- failed: true
- unstable: true
- notbuilt: true
- projects:
- - project-compare-type: 'ANT'
- project-pattern: 'releng'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/master'
- file-paths:
- - compare-type: ANT
- pattern: jjb-sandbox/**
-
- wrappers: ''
-
- builders:
- - shell:
- !include-raw-escape: verify-sandbox-jobs.sh
- # yamllint disable rule:line-length
- - shell: |
- #!/bin/bash
- jenkins-jobs update --delete-old -r jjb/releng-defaults.yaml:jjb/releng-macros.yaml:jjb/opnfv/installer-params.yml:jjb/opnfv/slave-params.yml:jjb-sandbox
- # yamllint enable
- publishers:
- - archive-artifacts:
- artifacts: 'job_output/*'
- - email-jenkins-admins-on-failure
+++ /dev/null
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 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
-##############################################################################
-#test for non-ascii characters, these can pass the test and end up breaking things in production
-for x in $(find . -name *\.yml); do
-
- if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
- echo "file "$x" contains non-ascii characters"
- exit 1
- fi
-
-done
-
-jenkins-jobs test -r jjb/releng-defaults.yaml:jjb/releng-macros.yaml:jjb/opnfv/installer-params.yml:jjb/opnfv/slave-params.yml:jjb-sandbox \
- -o job_output
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
+ - shell: |
+ if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
+ echo 'REPO=opnfv' > functest_repo
+ else
+ echo 'REPO=ollivier' > functest_repo
+ fi
+ - inject:
+ properties-file: functest_repo
- multijob:
name: functest-smoke
condition: ALWAYS
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
FUNCTEST_SUITE_NAME=tempest_smoke_serial
FUNCTEST_MODE=testcase
+ REPO=$REPO
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
node-parameters: true
kill-phase-on: NEVER
+ enable-condition: "def m = '$DEPLOY_SCENARIO' != k8s-nosdn-nofeature-noha"
abort-all-job: true
git-revision: false
- multijob:
<<: *danube
- 'os-ovn-nofeature-noha':
<<: *danube
+ - 'os-nosdn-nofeature-noha':
+ <<: *master
+ - 'os-nosdn-nofeature-ha':
+ <<: *master
- 'os-odl-nofeature-noha':
<<: *master
- 'os-odl-nofeature-ha':
<<: *master
+ - 'os-nosdn-queens-noha':
+ <<: *master
+ - 'os-nosdn-queens-ha':
+ <<: *master
- 'os-odl-queens-noha':
<<: *master
- 'os-odl-queens-ha':
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
+ - shell: |
+ if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
+ echo 'REPO=opnfv' > functest_repo
+ else
+ echo 'REPO=ollivier' > functest_repo
+ fi
+ - inject:
+ properties-file: functest_repo
- multijob:
name: functest-smoke
condition: ALWAYS
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
FUNCTEST_MODE=$FUNCTEST_MODE
FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
+ REPO=$REPO
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
predefined-parameters:
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
kill-phase-on: NEVER
- enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/
- && $BUILD_NUMBER % 2 == 1"
+ enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
abort-all-job: false
git-revision: false
- multijob:
predefined-parameters:
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
kill-phase-on: NEVER
- enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/
- && $BUILD_NUMBER % 2 == 0"
+ enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
abort-all-job: false
git-revision: false
- multijob:
name: Baremetal Deploy and Test Phase
condition: SUCCESSFUL
projects:
+ - name: 'apex-os-nosdn-nofeature-noha-baremetal-master'
+ 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-master'
+ 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-master'
node-parameters: false
current-parameters: false
kill-phase-on: NEVER
abort-all-job: true
git-revision: false
+ - name: 'apex-os-nosdn-queens-noha-baremetal-master'
+ 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-queens-ha-baremetal-master'
+ 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-queens-noha-baremetal-master'
node-parameters: false
current-parameters: false
kill-phase-on: FAILURE
abort-all-job: true
git-revision: true
+ - shell: |
+ if echo $DEPLOY_SCENARIO | grep queens &> /dev/null; then
+ echo 'REPO=opnfv' > functest_repo
+ else
+ echo 'REPO=ollivier' > functest_repo
+ fi
+ - inject:
+ properties-file: functest_repo
- multijob:
name: functest-smoke
condition: ALWAYS
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
FUNCTEST_MODE=$FUNCTEST_MODE
FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME
+ REPO=$REPO
GERRIT_BRANCH=$GERRIT_BRANCH
GERRIT_REFSPEC=$GERRIT_REFSPEC
GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
predefined-parameters:
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
kill-phase-on: NEVER
- enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/
- && $BUILD_NUMBER % 2 == 1"
+ enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
abort-all-job: false
git-revision: false
- multijob:
predefined-parameters:
DEPLOY_SCENARIO=$DEPLOY_SCENARIO
kill-phase-on: NEVER
- enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/
- && $BUILD_NUMBER % 2 == 0"
+ enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/"
abort-all-job: false
git-revision: false
- multijob:
master:
+ - 'os-nosdn-nofeature-noha'
+ - 'os-nosdn-nofeature-ha'
- 'os-odl-nofeature-noha'
- 'os-odl-nofeature-ha'
+ - 'os-nosdn-queens-noha'
+ - 'os-nosdn-queens-ha'
- 'os-odl-queens-noha'
- 'os-odl-queens-ha'
fraser:
- string:
name: DEPLOY_SCENARIO
default: 'os-odl-nofeature-ha'
+ - string:
+ name: PROJECT
+ default: '{project}'
scm:
- git-scm
- string:
name: DEPLOY_SCENARIO
default: '{scenario}'
- - string:
- name: PROJECT
- default: '{project}'
builders:
- trigger-builds:
- project: '{installer}-deploy-{pod}-daily-{stream}'
current-parameters: false
- predefined-parameters:
- DEPLOY_SCENARIO='os-nosdn-nofeature-ha'
- PROJECT='armband'
+ predefined-parameters: |
+ DEPLOY_SCENARIO=os-nosdn-nofeature-ha
+ PROJECT=armband
same-node: true
block: true
if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then
sudo chmod 666 ${DOVETAIL_CONFIG}/pod.yaml
echo "Adapt process info for $INSTALLER_TYPE ..."
- attack_process='rabbitmq'
+ if [ "$INSTALLER_TYPE" == "apex" ]; then
+ attack_process='rabbitmq_server'
+ else
+ attach_process='rabbitmq'
+ fi
cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml
process_info:
-- {testcase_name: dovetail.ha.tc010, attack_process: ${attack_process}}
+- {testcase_name: dovetail.ha.rabbitmq, attack_process: ${attack_process}}
EOF
echo "file ${DOVETAIL_CONFIG}/pod.yaml:"
FUNCTEST_IMAGE=${REPO}/functest-healthcheck:${DOCKER_TAG}
echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
docker pull ${FUNCTEST_IMAGE}>/dev/null
- cmd="docker run --rm --privileged=true ${volumes} ${FUNCTEST_IMAGE} check_deployment"
+ cmd="docker run --rm ${volumes} ${FUNCTEST_IMAGE} check_deployment"
echo "Checking deployment, CMD: ${cmd}"
eval ${cmd}
ret_value=$?
FUNCTEST_IMAGE=${REPO}/functest-${tier}:${DOCKER_TAG}
echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
docker pull ${FUNCTEST_IMAGE}>/dev/null
- cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
+ cmd="docker run --rm ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
echo "Running Functest tier '${tier}'. CMD: ${cmd}"
eval ${cmd}
ret_value=$?
case ${test_name} in
connection_check|api_check|snaps_health_check)
FUNCTEST_IMAGE=${REPO}/functest-healthcheck:${DOCKER_TAG} ;;
- vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|snaps_smoke)
+ vping_ssh|vping_userdata|cinder_test|tempest_smoke_serial|rally_sanity|refstack_defcore|patrole|odl|snaps_smoke|neutron_trunk)
FUNCTEST_IMAGE=${REPO}/functest-smoke:${DOCKER_TAG} ;;
tempest_full_parallel|rally_full)
FUNCTEST_IMAGE=${REPO}/functest-components:${DOCKER_TAG} ;;
- cloudify_ims|orchestra_openims|orchestra_clearwaterims|vyos_vrouter)
+ cloudify_ims|vyos_vrouter|juju_epc)
FUNCTEST_IMAGE=${REPO}/functest-vnf:${DOCKER_TAG} ;;
- promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd|fds)
+ doctor-notification|bgpvpn|functest-odl-sfc|barometercollectd|fds)
FUNCTEST_IMAGE=${REPO}/functest-features:${DOCKER_TAG} ;;
parser-basics)
FUNCTEST_IMAGE=${REPO}/functest-parser:${DOCKER_TAG} ;;
esac
echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..."
docker pull ${FUNCTEST_IMAGE}>/dev/null
- cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
+ cmd="docker run --rm ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
echo "Running Functest test case '${test_name}'. CMD: ${cmd}"
eval ${cmd}
ret_value=$?
rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
-# 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
-
echo "Functest: Start Docker and prepare environment"
echo "Functest: Download images that will be used by test cases"
run_tiers ${tiers}
else
if [ ${DEPLOY_TYPE} == 'baremetal' ] && [ "${HOST_ARCH}" != "aarch64" ]; then
- tiers=(healthcheck smoke features vnf parser)
+ if [[ ${BRANCH} == "stable/fraser" ]]; then
+ tiers=(healthcheck smoke features vnf parser)
+ else
+ tiers=(healthcheck smoke features vnf)
+ fi
else
- tiers=(healthcheck smoke features parser)
+ if [[ ${BRANCH} == "stable/fraser" ]]; then
+ tiers=(healthcheck smoke features parser)
+ else
+ tiers=(healthcheck smoke features)
+ fi
fi
run_tiers ${tiers}
fi
- 'functest-{testsuite}-parameter'
- string:
name: DEPLOY_SCENARIO
- default: 'os-odl_l2-nofeature-ha'
+ default: 'os-nosdn-nofeature-noha'
- string:
name: CLEAN_DOCKER_IMAGES
default: 'false'
- 'connection_check'
- 'api_check'
- 'snaps_health_check'
- - 'vping_userdata'
- 'vping_ssh'
+ - 'vping_userdata'
+ - 'cinder_test'
- 'tempest_smoke_serial'
- 'rally_sanity'
+ - 'refstack_defcore'
+ - 'patrole'
- 'odl'
- - 'odl_netvirt'
- 'snaps_smoke'
- - 'refstack_defcore'
- - 'promise'
- - 'doctor'
+ - 'neutron_trunk'
+ - 'doctor-notification'
- 'bgpvpn'
- - 'parser'
- - 'security_scan'
+ - 'functest-odl-sfc'
+ - 'barometercollectd'
+ - 'fds'
- 'tempest_full_parallel'
- 'rally_full'
- 'cloudify_ims'
- - 'cloudify_vrouter'
- - 'orchestra_openims'
- - 'orchestra_clearwaterims'
+ - 'vyos_vrouter'
+ - 'juju_epc'
+ - 'parser'
default: 'connection_check'
- choice:
name: FUNCTEST_TIER
- 'features'
- 'components'
- 'vnf'
+ - 'parser'
default: 'healthcheck'
- string:
name: TESTCASE_OPTIONS
# yamllint disable rule:key-duplicates
image:
- 'core'
+ - 'tempest'
- 'healthcheck'
- 'features'
- 'components'
- 'smoke'
- 'vnf'
+ exclude:
+ - stream: 'master'
+ image: 'parser'
+ - stream: 'fraser'
+ image: 'tempest'
+
# settings for jobs run in multijob phases
build-job-settings: &build-job-settings
current-parameters: false
projects:
- name: 'functest-core-docker-manifest-{stream}'
<<: *manifest-job-settings
+ - multijob:
+ name: 'build functest-tempest images'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-tempest-docker-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-tempest-docker-build-arm64-{stream}'
+ <<: *build-job-settings
+ - multijob:
+ name: 'publish functest-tempest manifests'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-tempest-docker-manifest-{stream}'
+ <<: *manifest-job-settings
- multijob:
name: 'build all functest images'
condition: SUCCESSFUL
PUSH_IMAGE=$PUSH_IMAGE
COMMIT_ID=$COMMIT_ID
GERRIT_REFNAME=$GERRIT_REFNAME
- DOCKERFILE=$DOCKERFILE
kill-phase-on: FAILURE
abort-all-jobs: false
<<: *master
<<: *other-receivers
# projects with jobs for euphrates
+ - 'barometer-collectd':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-collectd'
+ <<: *fraser
+ <<: *other-receivers
+ - 'barometer-grafana':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-grafana'
+ <<: *fraser
+ <<: *other-receivers
+ - 'barometer-influxdb':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-influxdb'
+ <<: *fraser
+ <<: *other-receivers
+ - 'barometer-kafka':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-kafka'
+ <<: *fraser
+ <<: *other-receivers
+ - 'barometer-ves':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-ves'
+ <<: *fraser
+ <<: *other-receivers
+ - 'barometer-snmp':
+ project: 'barometer'
+ dockerdir: 'docker/barometer-snmp'
+ <<: *fraser
+ <<: *other-receivers
- 'bottlenecks':
project: 'bottlenecks'
<<: *euphrates
git clone "https://gerrit.opnfv.org/gerrit/$PROJECT.git" $CLONE_PATH/$PROJECT
else
pushd "$CLONE_PATH/$PROJECT" &>/dev/null
- git pull -f
+ git pull -f origin master
popd &> /dev/null
fi
unstable: false
notbuilt: false
- centos:
- disabled: false
+ disabled: true
successful: true
failed: true
unstable: true
publishers:
- email:
- recipients: jean.gaoliang@huawei.com limingjiang@huawei.com ross.b.brattain@intel.com
+ recipients: jean.gaoliang@huawei.com limingjiang@huawei.com
- email-jenkins-admins-on-failure
########################
[testenv:jjb]
deps =
- jenkins-job-builder==1.6.1
+ jenkins-job-builder==2.0.3
commands=
- jenkins-jobs test -o job_output -r jjb/global:{posargs:"jjb/"}
+ jenkins-jobs test -o job_output -r {posargs:"jjb/"}
[testenv:docs]
deps = -r{toxinidir}/docs/requirements.txt