.cache
.tox
*.retry
+job_output/
To ssh://agardner@gerrit.opnfv.org:29418/releng.git
* [new branch] HEAD -> refs/publish/master
+Test with tox::
+
+ tox -v -ejjb
+
+Submit the change to gerrit::
+
+ git review -v
+
Follow the link to gerrit https://gerrit.opnfv.org/gerrit/51 in a few moments
the verify job will have completed and you will see Verified +1 jenkins-ci in
the gerrit ui.
./build.sh $BUILD_ARGS
RPM_VERSION=$(grep Version: $WORKSPACE/build/rpm_specs/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
# list the contents of BUILD_OUTPUT directory
-echo "Build Directory is ${BUILD_DIRECTORY}"
+echo "Build Directory is ${BUILD_DIRECTORY}/../.build"
echo "Build Directory Contents:"
echo "-------------------------"
-ls -al $BUILD_DIRECTORY
+ls -al ${BUILD_DIRECTORY}/../.build
# list the contents of CACHE directory
echo "Cache Directory is ${CACHE_DIRECTORY}"
echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
- echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
+ echo "OPNFV_ARTIFACT_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/../.build/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
echo "OPNFV_SRPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.src.rpm"
echo "OPNFV_RPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.noarch.rpm"
- echo "OPNFV_RPM_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/noarch/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)"
+ echo "OPNFV_RPM_SHA512SUM=$(sha512sum $BUILD_DIRECTORY/../.build/noarch/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)"
echo "OPNFV_BUILD_URL=$BUILD_URL"
) > $WORKSPACE/opnfv.properties
fi
# use RPMs
else
# find version of RPM
- VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-[0-9]{8}')
+ VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)')
# build RPM List which already includes base Apex RPM
for pkg in ${APEX_PKGS}; do
RPM_LIST+=" ${RPM_INSTALL_PATH}/opnfv-apex-${pkg}-${VERSION_EXTENSION}.noarch.rpm"
undercloud_mac=$(sudo virsh domiflist undercloud | grep default | \
grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
INSTALLER_IP=$(/usr/sbin/arp -e | grep ${undercloud_mac} | awk {'print $1'})
+
sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/overcloudrc /tmp/overcloudrc
sudo chmod 755 /tmp/overcloudrc
source /tmp/overcloudrc
# robot suites need the ssh key to log in to controller nodes, so throwing it
# in tmp, and mounting /tmp as $HOME as far as robot is concerned
- sudo mkdir -p /tmp/.ssh
+ sudo rm -rf /tmp/.ssh
+ sudo mkdir /tmp/.ssh
+ sudo chmod 0700 /tmp/.ssh
sudo scp -o StrictHostKeyChecking=no root@$INSTALLER_IP:/home/stack/.ssh/id_rsa /tmp/.ssh/
sudo chown -R jenkins-ci:jenkins-ci /tmp/.ssh
# done with sudo. jenkins-ci is the user from this point
- sudo mv /tmp/.ssh/id_rsa ~jenkins-ci/.ssh/
- chmod -R 0600 ~jenkins-ci/.ssh
+ chmod 0600 /tmp/.ssh/id_rsa
# cbench requires the openflow drop test feature to be installed.
sshpass -p karaf ssh -o StrictHostKeyChecking=no \
docker pull opnfv/cperf:$DOCKER_TAG
- robot_cmd="pybot -e exclude -L TRACE \
+ robot_cmd="pybot -e exclude -L TRACE -d /tmp \
-v ODL_SYSTEM_1_IP:${SDN_CONTROLLER_IP} \
-v ODL_SYSTEM_IP:${SDN_CONTROLLER_IP} \
-v BUNDLEFOLDER:/opt/opendaylight \
-v of_port:6653"
robot_suite="/home/opnfv/repos/odl_test/csit/suites/openflowplugin/Performance/010_Cbench.robot"
- docker run -v /tmp:/tmp opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite}
+ docker run -ti -v /tmp:/tmp opnfv/cperf:$DOCKER_TAG ${robot_cmd} ${robot_suite}
- builder:
name: cperf-cleanup
use-build-blocker: true
blocking-jobs:
- 'daisy-daily-.*'
- - 'daisy4nfv-(merge|verify)-.*'
block-level: 'NODE'
wrappers:
enabled: true
max-total: 4
option: 'project'
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - '{installer}-daily-.*'
+ block-level: 'NODE'
scm:
- git-scm
enabled: true
max-total: 6
option: 'project'
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '{installer}-daily-.*'
- - 'daisy4nfv-(merge|verify)-.*'
- block-level: 'NODE'
scm:
- git-scm
- 'build':
slave-label: 'opnfv-build-centos'
- 'deploy-virtual':
- slave-label: 'opnfv-build-centos'
+ slave-label: 'daisy-virtual'
#####################################
# jobs
#####################################
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - '{alias}-(merge|verify)-.*'
- - '{project}-daily-.*'
+ - '{alias}-merge-(master|danube)'
block-level: 'NODE'
scm:
- project:
name: 'daisy4nfv-verify-jobs'
-
project: 'daisy'
-
installer: 'daisy'
-
##########################################################
# use alias to keep the jobs'name existed alread unchanged
##########################################################
# patch verification phases
#####################################
phase:
- - 'build':
+ - unit:
+ slave-label: 'opnfv-build'
+ - build:
slave-label: 'opnfv-build-centos'
#####################################
# jobs
#####################################
- job-template:
name: '{alias}-verify-{stream}'
-
project-type: multijob
-
disabled: false
-
concurrent: true
-
properties:
- logrotate-default
- throttle:
enabled: true
max-total: 4
option: 'project'
-
scm:
- git-scm
-
wrappers:
- ssh-agent-wrapper
- timeout:
timeout: 360
fail: true
-
triggers:
- gerrit:
server-name: 'gerrit.opnfv.org'
builders:
- description-setter:
description: "Built on $NODE_NAME"
+ - multijob:
+ name: unit
+ condition: SUCCESSFUL
+ projects:
+ - name: '{alias}-verify-{name}-{stream}'
+ current-parameters: true
+ node-parameters: false
+ kill-phase-on: FAILURE
+ abort-all-job: true
- multijob:
name: build
condition: SUCCESSFUL
- job-template:
name: '{alias}-verify-{phase}-{stream}'
-
disabled: '{obj:disabled}'
-
concurrent: true
-
properties:
- logrotate-default
- throttle:
enabled: true
max-total: 6
option: 'project'
- - build-blocker:
- use-build-blocker: true
- blocking-jobs:
- - '{alias}-(merge|verify)-.*'
- - '{installer}-daily-.*'
- block-level: 'NODE'
-
scm:
- git-scm
-
wrappers:
- ssh-agent-wrapper
- timeout:
timeout: 360
fail: true
-
parameters:
- project-parameter:
project: '{project}'
- '{slave-label}-defaults'
- '{alias}-verify-defaults':
gs-pathname: '{gs-pathname}'
-
builders:
- description-setter:
description: "Built on $NODE_NAME"
- shell:
!include-raw: ./daisy4nfv-workspace-cleanup.sh
+- builder:
+ name: daisy-verify-unit-macro
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o pipefail
+ set -o xtrace
+ tox -e py27
+
#####################################
# parameter macros
#####################################
--- /dev/null
+jenkins-job-builder
elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# If production lab then creds may be retrieved dynamically
# creds are on the jumphost, always in the same folder
- labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc"
+ labconfig="-v $LAB_CONFIG/admin-openrc:/etc/yardstick/openstack.creds"
# If dev lab, credentials may not be the default ones, just provide a path to put them into docker
# replace the default one by the customized one provided by jenkins config
fi
--- /dev/null
+paramiko>=2.0.1
+mock==1.3.0
+requests==2.9.1
--- /dev/null
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+
+nose
+coverage
--- /dev/null
+#!/usr/bin/env python
+
+from setuptools import setup
+
+setup(
+ name="opnfv",
+ version="master",
+ url="https://www.opnfv.org",
+)
--- /dev/null
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py27
+skipsdist = True
+
+[testenv]
+usedevelop = True
+setenv=
+ HOME = {envtmpdir}
+ PYTHONPATH = {toxinidir}
+
+[testenv:jjb]
+deps =
+ -rjjb/test-requirements.txt
+commands=
+ jenkins-jobs test -o job_output -r jjb/
+
+[testenv:modules]
+deps=
+ -rmodules/requirements.txt
+ -rmodules/test-requirements.txt
+commands =
+ nosetests -w modules \
+ --with-xunit \
+ --xunit-file=modules/nosetests.xml \
+ --cover-package=opnfv \
+ --with-coverage \
+ --cover-xml \
+ --cover-html \
+ tests/unit