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::
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
<<: *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:
[ -d ${releng_repo} ] && sudo rm -rf ${releng_repo}
git clone https://gerrit.opnfv.org/gerrit/releng ${releng_repo} >/dev/null
+pharos_repo=${WORKSPACE}/pharos
+[ -d ${pharos_repo} ] && sudo rm -rf ${pharos_repo}
+git clone https://git.opnfv.org/pharos ${pharos_repo} >/dev/null
+
if [[ ${INSTALLER_TYPE} != 'joid' ]]; then
echo "SUT branch is $SUT_BRANCH"
echo "dovetail branch is $BRANCH"
fi
cat $OPENRC
+# These packages are used for parsing yaml files and decrypting ipmi user and password.
+sudo pip install shyaml
+sudo yum install -y rubygems || sudo apt-get install -y ruby
+sudo gem install hiera-eyaml
+
if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then
compass_repo=${WORKSPACE}/compass4nfv/
git clone https://github.com/opnfv/compass4nfv.git ${compass_repo} >/dev/null
- sudo pip install shyaml
scenario_file=${compass_repo}/deploy/conf/hardware_environment/$NODE_NAME/os-nosdn-nofeature-ha.yml
ipmiIp=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiIp)
ipmiPass=$(cat ${scenario_file} | shyaml get-value hosts.0.ipmiPass)
fuel_ctl_ssh_options="${ssh_options} -i ${SSH_KEY}"
ssh_user="ubuntu"
fuel_ctl_ip=$(ssh 2>/dev/null ${fuel_ctl_ssh_options} "${ssh_user}@${INSTALLER_IP}" \
- "sudo salt --out yaml 'ctl*' pillar.get _param:openstack_control_address | \
- awk '{print \$2; exit}'") &> /dev/null
+ "sudo salt 'cfg*' pillar.get _param:openstack_control_address --out text| \
+ cut -f2 -d' '")
+ ipmi_index=$(ssh 2>/dev/null ${fuel_ctl_ssh_options} "${ssh_user}@${INSTALLER_IP}" \
+ "sudo salt 'ctl*' network.ip_addrs cidr=${fuel_ctl_ip} --out text | grep ${fuel_ctl_ip} | cut -c 5")
+ organization="$(cut -d'-' -f1 <<< "${NODE_NAME}")"
+ pod_name="$(cut -d'-' -f2 <<< "${NODE_NAME}")"
+ pdf_file=${pharos_repo}/labs/${organization}/${pod_name}.yaml
+ ipmiIp=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.address)
+ ipmiIp="$(cut -d'/' -f1 <<< "${ipmiIp}")"
+ ipmiPass=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.pass)
+ ipmiUser=$(cat ${pdf_file} | shyaml get-value nodes.$[ipmi_index-1].remote_management.user)
+ [[ $ipmiUser == ENC* ]] && ipmiUser=$(eyaml decrypt -s ${ipmiUser//[[:blank:]]/})
+ [[ $ipmiPass == ENC* ]] && ipmiPass=$(eyaml decrypt -s ${ipmiPass//[[:blank:]]/})
+
cat << EOF >${DOVETAIL_CONFIG}/pod.yaml
nodes:
-- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}}
+- {ip: ${INSTALLER_IP}, name: node0, key_filename: /home/opnfv/userconfig/pre_config/id_rsa,
+ role: Jumpserver, user: ${ssh_user}}
+- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /home/opnfv/userconfig/pre_config/id_rsa,
+ role: controller, user: ${ssh_user}, ipmi_ip: ${ipmiIp}, ipmi_user: ${ipmiUser}, ipmi_password: ${ipmiPass}}
EOF
fi
if [ "$INSTALLER_TYPE" == "apex" ]; then
attack_process='rabbitmq_server'
else
- attach_process='rabbitmq'
+ attack_process='rabbitmq'
fi
cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml
process_info:
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=$?
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
[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