diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | docs/jenkins-job-builder/opnfv-jjb-usage.rst | 8 | ||||
-rw-r--r-- | jjb/cperf/cperf-ci-jobs.yml | 12 | ||||
-rw-r--r-- | jjb/daisy4nfv/daisy-daily-jobs.yml | 1 | ||||
-rw-r--r-- | jjb/daisy4nfv/daisy-project-jobs.yml | 11 | ||||
-rw-r--r-- | jjb/daisy4nfv/daisy4nfv-merge-jobs.yml | 5 | ||||
-rw-r--r-- | jjb/daisy4nfv/daisy4nfv-verify-jobs.yml | 46 | ||||
-rw-r--r-- | jjb/test-requirements.txt | 1 | ||||
-rw-r--r-- | jjb/xci/xci-daily-jobs.yml | 169 | ||||
-rwxr-xr-x | jjb/xci/xci-deploy.sh | 94 | ||||
-rwxr-xr-x | jjb/yardstick/yardstick-daily.sh | 2 | ||||
-rw-r--r-- | modules/requirements.txt | 3 | ||||
-rw-r--r-- | modules/test-requirements.txt | 6 | ||||
-rwxr-xr-x | prototypes/xci/config/env-vars | 1 | ||||
-rw-r--r-- | setup.py | 9 | ||||
-rw-r--r-- | tox.ini | 34 |
16 files changed, 164 insertions, 239 deletions
diff --git a/.gitignore b/.gitignore index 431e52139..eeabaeb63 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ testapi_venv/ .cache .tox *.retry +job_output/ diff --git a/docs/jenkins-job-builder/opnfv-jjb-usage.rst b/docs/jenkins-job-builder/opnfv-jjb-usage.rst index 52dbdebe5..f34833f5c 100644 --- a/docs/jenkins-job-builder/opnfv-jjb-usage.rst +++ b/docs/jenkins-job-builder/opnfv-jjb-usage.rst @@ -21,6 +21,14 @@ Make changes:: 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. diff --git a/jjb/cperf/cperf-ci-jobs.yml b/jjb/cperf/cperf-ci-jobs.yml index 6cd4e22dc..f6e068530 100644 --- a/jjb/cperf/cperf-ci-jobs.yml +++ b/jjb/cperf/cperf-ci-jobs.yml @@ -126,18 +126,20 @@ 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 \ @@ -148,7 +150,7 @@ 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 \ @@ -160,7 +162,7 @@ -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 diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index c5d8e7e8b..aac76baa4 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -71,7 +71,6 @@ use-build-blocker: true blocking-jobs: - 'daisy-daily-.*' - - 'daisy4nfv-(merge|verify)-.*' block-level: 'NODE' wrappers: diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index 52769ca88..e631ee9b9 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -54,6 +54,11 @@ enabled: true max-total: 4 option: 'project' + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '{installer}-daily-.*' + block-level: 'NODE' scm: - git-scm @@ -138,12 +143,6 @@ 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 diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index 95e72e550..9e7b867af 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -29,7 +29,7 @@ - 'build': slave-label: 'opnfv-build-centos' - 'deploy-virtual': - slave-label: 'opnfv-build-centos' + slave-label: 'daisy-virtual' ##################################### # jobs ##################################### @@ -148,8 +148,7 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - '{alias}-(merge|verify)-.*' - - '{project}-daily-.*' + - '{alias}-merge-(master|danube)' block-level: 'NODE' scm: diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index 9f44d99fb..a0ec2ebd7 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -1,10 +1,7 @@ - project: name: 'daisy4nfv-verify-jobs' - project: 'daisy' - installer: 'daisy' - ########################################################## # use alias to keep the jobs'name existed alread unchanged ########################################################## @@ -26,7 +23,9 @@ # patch verification phases ##################################### phase: - - 'build': + - unit: + slave-label: 'opnfv-build' + - build: slave-label: 'opnfv-build-centos' ##################################### # jobs @@ -39,29 +38,22 @@ ##################################### - 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' @@ -108,6 +100,15 @@ - 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 projects: @@ -124,33 +125,21 @@ - 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}' @@ -158,7 +147,6 @@ - '{slave-label}-defaults' - '{alias}-verify-defaults': gs-pathname: '{gs-pathname}' - builders: - description-setter: description: "Built on $NODE_NAME" @@ -177,6 +165,16 @@ - 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 ##################################### diff --git a/jjb/test-requirements.txt b/jjb/test-requirements.txt new file mode 100644 index 000000000..6b700dcfc --- /dev/null +++ b/jjb/test-requirements.txt @@ -0,0 +1 @@ +jenkins-job-builder diff --git a/jjb/xci/xci-daily-jobs.yml b/jjb/xci/xci-daily-jobs.yml index dbe3b654b..f9fbc1de8 100644 --- a/jjb/xci/xci-daily-jobs.yml +++ b/jjb/xci/xci-daily-jobs.yml @@ -1,34 +1,37 @@ +#-------------------------------- +# These jobs run on a daily basis and deploy OpenStack +# using the pinned versions of opnfv/releng, openstack/bifrost +# and openstack/openstack-ansible. Due to this, there is no +# version/branch is set/passed to jobs and instead the versions +# are checked out based on what is configured. +#-------------------------------- - project: - name: 'bifrost-osa-daily' + project: 'releng' + + name: 'xci-daily' #-------------------------------- -# BRANCH ANCHORS +# Branch Anchors #-------------------------------- -# the versions stated here default to branches which then later -# on used for checking out the branches, pulling in head of the branch. -# but they also allow us to state sha1 so instead of checking out the -# branches, we can check out sha1 if we want to use locked/specific -# sha1 or manually enter sha1. master: &master stream: master - openstack-osa-version: '{stream}' - openstack-bifrost-version: '{stream}' - opnfv-releng-version: 'master' + opnfv-releng-version: master gs-pathname: '' ocata: &ocata stream: ocata - openstack-osa-version: 'stable/{stream}' - openstack-bifrost-version: 'stable/{stream}' - opnfv-releng-version: 'master' + opnfv-releng-version: master gs-pathname: '/{stream}' #-------------------------------- -# scenarios +# Scenarios #-------------------------------- scenario: - # HA scenarios - 'os-nosdn-nofeature-ha': auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'ha' + - 'os-nosdn-nofeature-noha': + auto-trigger-name: 'daily-trigger-disabled' + xci-flavor: 'noha' #-------------------------------- -# XCI PODs +# XCI PODs #-------------------------------- pod: - virtual: @@ -36,7 +39,7 @@ - virtual: <<: *ocata #-------------------------------- -# Supported Distros +# Supported Distros #-------------------------------- distro: - 'xenial': @@ -44,7 +47,7 @@ slave-label: xci-xenial-virtual dib-os-release: 'xenial' dib-os-element: 'ubuntu-minimal' - dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony' + dib-os-packages: 'vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptabls' extra-dib-elements: 'openssh-server' - 'centos7': disabled: true @@ -65,7 +68,6 @@ # Phases #-------------------------------- phase: - - 'provision' - 'deploy' - 'functest' #-------------------------------- @@ -76,19 +78,6 @@ - 'xci-{phase}-{pod}-{distro}-daily-{stream}' #-------------------------------- -# VM defaults -#-------------------------------- -- defaults: - name: daily_vm_defaults - test-vm-num-nodes: '6' - test-vm-node-names: 'xcimaster controller00 controller01 controller02 compute00 compute01' - vm-domain-type: 'kvm' - vm-cpu: '8' - vm-disk: '100' - vm-memory-size: '16384' - vm-disk-cache: 'unsafe' - -#-------------------------------- # job templates #-------------------------------- - job-template: @@ -103,25 +92,20 @@ use-build-blocker: true blocking-jobs: - '^xci-os.*' + - '^xci-deploy.*' + - '^xci-functest.*' + - '^bifrost-periodic-.*' + - '^osa-periodic-.*' block-level: 'NODE' - logrotate-default parameters: - string: - name: OPENSTACK_OSA_VERSION - default: '{openstack-osa-version}' - - string: - name: OPENSTACK_BIFROST_VERSION - default: '{openstack-osa-version}' - - string: - name: OPNFV_RELENG_VERSION - default: '{opnfv-releng-version}' - - string: - name: USE_PROMOTED_VERSIONS - default: 'true' - - string: name: DEPLOY_SCENARIO default: '{scenario}' + - string: + name: XCI_FLAVOR + default: '{xci-flavor}' - label: name: SLAVE_LABEL default: '{slave-label}' @@ -130,42 +114,25 @@ - '{auto-trigger-name}' wrappers: - - xci-fix-perms-workspace + - fix-workspace-permissions builders: - description-setter: description: "Built on $NODE_NAME" - trigger-builds: - - project: 'xci-provision-{pod}-{distro}-daily-{stream}' - current-parameters: false - predefined-parameters: | - OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION - OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION - OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION - USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - same-node: true - block: true - - trigger-builds: - project: 'xci-deploy-{pod}-{distro}-daily-{stream}' current-parameters: false predefined-parameters: | - OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION - OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION - OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION - USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS DEPLOY_SCENARIO=$DEPLOY_SCENARIO + XCI_FLAVOR=$XCI_FLAVOR same-node: true block: true - trigger-builds: - project: 'xci-functest-{pod}-{distro}-daily-{stream}' current-parameters: false predefined-parameters: | - OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION - OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION - OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION - USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS DEPLOY_SCENARIO=$DEPLOY_SCENARIO + XCI_FLAVOR=$XCI_FLAVOR same-node: true block: true block-thresholds: @@ -182,37 +149,36 @@ disabled: '{obj:disabled}' - defaults: daily_vm_defaults - concurrent: false properties: - build-blocker: use-build-blocker: true blocking-jobs: - - '^xci-provision.*' - '^xci-deploy.*' - '^xci-functest.*' + - '^bifrost-periodic-.*' + - '^osa-periodic-.*' block-level: 'NODE' - logrotate-default + wrappers: + - fix-workspace-permissions + + scm: + - git-scm + parameters: - - string: - name: OPENSTACK_OSA_VERSION - default: '{openstack-osa-version}' - - string: - name: OPENSTACK_BIFROST_VERSION - default: '{openstack-osa-version}' - - string: - name: OPNFV_RELENG_VERSION - default: '{opnfv-releng-version}' - - string: - name: USE_PROMOTED_VERSIONS - default: 'true' + - project-parameter: + project: '{project}' + branch: '{opnfv-releng-version}' - string: name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-ha' - string: + name: XCI_FLAVOR + default: 'ha' + - string: name: DISTRO default: '{distro}' - string: @@ -222,32 +188,11 @@ name: DIB_OS_ELEMENT default: '{dib-os-element}' - string: - name: EXTRA_DIB_ELEMENTS - default: '{extra-dib-elements}' - - string: name: DIB_OS_PACKAGES default: '{dib-os-packages}' - string: - name: TEST_VM_NUM_NODES - default: '{test-vm-num-nodes}' - - string: - name: TEST_VM_NODE_NAMES - default: '{test-vm-node-names}' - - string: - name: VM_DOMAIN_TYPE - default: '{vm-domain-type}' - - string: - name: VM_CPU - default: '{vm-cpu}' - - string: - name: VM_DISK - default: '{vm-disk}' - - string: - name: VM_MEMORY_SIZE - default: '{vm-memory-size}' - - string: - name: VM_DISK_CACHE - default: '{vm-disk-cache}' + name: EXTRA_DIB_ELEMENTS + default: '{extra-dib-elements}' - string: name: CLEAN_DIB_IMAGES default: 'true' @@ -258,38 +203,20 @@ name: ANSIBLE_VERBOSITY default: '' - wrappers: - - xci-fix-perms-workspace - builders: - description-setter: description: "Built on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - 'xci-{phase}-builder' #--------------------------- -# wrapper macros -#--------------------------- -- wrapper: - name: xci-fix-perms-workspace - wrappers: - - pre-scm-buildstep: - - shell: | - #!/bin/bash - sudo chown -R $USER $WORKSPACE || exit 1 - -#--------------------------- # builder macros #--------------------------- - builder: - name: xci-provision-builder - builders: - - shell: - !include-raw: ./xci-provision.sh -- builder: name: xci-deploy-builder builders: - shell: !include-raw: ./xci-deploy.sh + - builder: name: xci-functest-builder builders: diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh index 87f9ec8db..cf5fe32d3 100755 --- a/jjb/xci/xci-deploy.sh +++ b/jjb/xci/xci-deploy.sh @@ -11,83 +11,21 @@ set -o errexit set -o nounset set -o pipefail -trap cleanup_and_upload EXIT - -function fix_ownership() { - if [ -z "${JOB_URL+x}" ]; then - echo "Not running as part of Jenkins. Handle the logs manually." - else - # Make sure cache exists - [[ ! -d ${HOME}/.cache ]] && mkdir ${HOME}/.cache - - sudo chown -R jenkins:jenkins $WORKSPACE - sudo chown -R jenkins:jenkins ${HOME}/.cache - fi -} - -function cleanup_and_upload() { - original_exit=$? - fix_ownership - exit $original_exit -} - -# check distro to see if we support it -if [[ ! "$DISTRO" =~ (xenial|centos7|suse) ]]; then - echo "Distro $DISTRO is not supported!" - exit 1 +cd $WORKSPACE/prototypes/xci + +# for daily jobs, we want to use working versions +# for periodic jobs, we will use whatever is set in the job, probably master +if [[ "$JOB_NAME" =~ "daily" ]]; then + # source pinned-vars to get releng version + source ./config/pinned-versions + + # checkout the version + git checkout -q $OPNFV_RELENG_VERSION + echo "Info: Using $OPNFV_RELENG_VERSION" +elif [[ "$JOB_NAME" =~ "periodic" ]]; then + echo "Info: Using $OPNFV_RELENG_VERSION" fi -# remove previously cloned repos -sudo /bin/rm -rf /opt/openstack-ansible /opt/stack /opt/releng /opt/functest - -# Fix up permissions -fix_ownership - -# openstack-ansible enables strict host key checking by default -export ANSIBLE_HOST_KEY_CHECKING=False - -# ensure the versions to checkout are set -export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-master} -export OPNFV_RELENG_VERSION=${OPNFV_RELENG_VERSION:-master} - -# log some info -echo -e "\n" -echo "***********************************************************************" -echo "* *" -echo "* Deploy OpenStack *" -echo "* *" -echo " openstack-ansible version: $OPENSTACK_OSA_VERSION" -echo " releng version: $OPNFV_RELENG_VERSION" -echo "* *" -echo "***********************************************************************" -echo -e "\n" -# clone releng repo -sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng /opt/releng -cd /opt/releng && sudo git checkout --quiet $OPNFV_RELENG_VERSION -echo "xci: using openstack-ansible commit" -git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>' - -# display the nodes -echo "xci: OpenStack nodes" -cd /opt/bifrost -source env-vars -ironic node-list - -# this script will be reused for promoting openstack-ansible versions and using -# promoted openstack-ansible versions as part of xci daily. -USE_PROMOTED_VERSIONS=${USE_PROMOTED_VERSIONS:-false} -if [ $USE_PROMOTED_VERSIONS = "true" ]; then - echo "TBD: Will use the promoted versions of openstack/opnfv projects" -fi - -cd /opt/releng/prototypes/openstack-ansible/scripts -sudo -E ./osa-deploy.sh - -# log some info -echo -e "\n" -echo "***********************************************************************" -echo "* *" -echo "* OpenStack deployment is completed! *" -echo "* *" -echo "***********************************************************************" -echo -e "\n" +# proceed with the deployment +cd $WORKSPACE/prototypes/xci +sudo -E ./xci-deploy.sh diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index f769e9cdd..973f83ad5 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -18,7 +18,7 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then 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 diff --git a/modules/requirements.txt b/modules/requirements.txt new file mode 100644 index 000000000..1eaf8d089 --- /dev/null +++ b/modules/requirements.txt @@ -0,0 +1,3 @@ +paramiko>=2.0.1 +mock==1.3.0 +requests==2.9.1 diff --git a/modules/test-requirements.txt b/modules/test-requirements.txt new file mode 100644 index 000000000..99d7f1313 --- /dev/null +++ b/modules/test-requirements.txt @@ -0,0 +1,6 @@ +# 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 diff --git a/prototypes/xci/config/env-vars b/prototypes/xci/config/env-vars index e2976a0a2..052be2ace 100755 --- a/prototypes/xci/config/env-vars +++ b/prototypes/xci/config/env-vars @@ -18,3 +18,4 @@ export DISTRO=${DISTRO:-ubuntu} export DIB_OS_RELEASE=${DIB_OS_RELEASE:-xenial} export DIB_OS_ELEMENT=${DIB_OS_ELEMENT:-ubuntu-minimal} export DIB_OS_PACKAGES=${DIB_OS_PACKAGES:-"vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables"} +export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"} diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..2d9246ec4 --- /dev/null +++ b/setup.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +from setuptools import setup + +setup( + name="opnfv", + version="master", + url="https://www.opnfv.org", +) diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..e9f5fbb0b --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +# 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 |