From d529db129508f041ee3307b7b7e1ae53218653d5 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Mon, 8 May 2017 18:02:41 +0530 Subject: [PATCH] Added Tempest Plugins Sanity Checker Job * It will clone tempest and get a project list having tempest plugin * Create virtualenv and installs tempest and other project plugins * Create tempest workspace * List tempest plugins * List tests * It will help to find tempest plugins issues and dependency mismatch. Change-Id: Idf04917b0fe8ad4b73d24d8874613d6911897f02 --- jenkins/jobs/projects.yaml | 4 +++ jenkins/jobs/tempest-jobs.yaml | 46 ++++++++++++++++++++++++++++++++++ zuul/layout.yaml | 2 ++ 3 files changed, 52 insertions(+) diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml index bfaacfe4c9..e3894f9aea 100644 --- a/jenkins/jobs/projects.yaml +++ b/jenkins/jobs/projects.yaml @@ -14689,6 +14689,10 @@ node-release: ubuntu-xenial suffix: '-nv' branch-override: default + - '{pipeline}-tempest-plugin-sanity-{node}{suffix}': + pipeline: gate + node: ubuntu-xenial + suffix: '-nv' - project: name: tempest-horizon diff --git a/jenkins/jobs/tempest-jobs.yaml b/jenkins/jobs/tempest-jobs.yaml index cb5cf8a3f6..4da2606923 100644 --- a/jenkins/jobs/tempest-jobs.yaml +++ b/jenkins/jobs/tempest-jobs.yaml @@ -55,3 +55,49 @@ publishers: - devstack-logs - console-log + + +- job-template: + name: '{pipeline}-tempest-plugin-sanity-{node}{suffix}' + node: '{node}' + + wrappers: + - build-timeout: + timeout: 30 + - timestamps + + builders: + - zuul-git-prep + - install-distro-packages + - revoke-sudo + - shell: | + #!/bin/bash -eux + cd $WORKSPACE + PROJECT_LIST="$(python ./openstack/tempest/tools/generate-tempest-plugins-list.py)" + # function to clone project using zuul-cloner + function clone_project() {{ + /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \ + git://git.openstack.org \ + openstack/"$1" + echo "$1 project clonned successfully." + }} + + # Clone projects having tempest plugins + for project in $PROJECT_LIST; do + clone_project $project + done + virtualenv $WORKSPACE/openstack/tempest/.venv + export TVENV="$WORKSPACE/openstack/tempest/tools/with_venv.sh" + $TVENV pip install $WORKSPACE/openstack/tempest + # Install other tempest plugins projects + for project in $PROJECT_LIST; do + $TVENV pip install $WORKSPACE/openstack/$project + done + # Create Tempest workspace + $TVENV tempest init $WORKSPACE/tempest_sanity + cd $WORKSPACE/tempest_sanity + $TVENV tempest list-plugins + $TVENV tempest run -l + + publishers: + - console-log diff --git a/zuul/layout.yaml b/zuul/layout.yaml index 48c107a532..b9e89f1240 100755 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -18216,6 +18216,8 @@ projects: - gate-tempest-dsvm-neutron-full-ubuntu-xenial-newton # non voting scenario test - gate-tempest-dsvm-neutron-scenario-multinode-ubuntu-xenial-nv + # tempest plugin sanity + - gate-tempest-plugin-sanity-ubuntu-xenial-nv gate: - gate-grenade-dsvm-multinode - gate-grenade-dsvm-neutron-multinode-ubuntu-xenial