From 1137e469f33d4181b2fad5b1e61dc1a9d2708c11 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Tue, 7 Aug 2018 13:04:07 +0300 Subject: [PATCH] Ensure that we support py34,py36,py37 envs This patch adds non-voting CI jobs for py34,py36,py37 envs. They will be turned to the voting as soon as they become green. Also, since configuration of zuul become bigger, it is moved to the separate directory. Change-Id: I2f9d526e769f37792db23242ef51e6bb703b2524 --- .zuul.d/python-jobs.yaml | 56 +++++++++++++++++++++++++++++ zuul.yaml => .zuul.d/zuul.yaml | 29 ++++++++------- tests/ci/playbooks/base/post.yaml | 41 --------------------- tests/ci/playbooks/pre-run-tox.yaml | 15 ++++++++ tox.ini | 4 +++ 5 files changed, 92 insertions(+), 53 deletions(-) create mode 100644 .zuul.d/python-jobs.yaml rename zuul.yaml => .zuul.d/zuul.yaml (64%) delete mode 100644 tests/ci/playbooks/base/post.yaml create mode 100644 tests/ci/playbooks/pre-run-tox.yaml diff --git a/.zuul.d/python-jobs.yaml b/.zuul.d/python-jobs.yaml new file mode 100644 index 0000000000..359c66f7e4 --- /dev/null +++ b/.zuul.d/python-jobs.yaml @@ -0,0 +1,56 @@ +- job: + name: rally-tox-functional + parent: tox + description: | + Run test for rally project. + + Uses tox with the ``self`` environment. + vars: + tox_envlist: functional + +- job: + name: rally-tox-self + parent: tox + description: | + Run test for rally project. + + Uses tox with the ``self`` environment. + vars: + tox_envlist: self + +- job: + name: rally-tox-py34 + parent: tox + nodeset: ubuntu-bionic + pre-run: tests/ci/playbooks/pre-run-tox.yaml + description: | + Run unit test for rally project. + + Uses tox with the ``py34`` environment. + vars: + tox_envlist: py34 + python_version: 3.4 + +- job: + name: rally-tox-py36 + parent: tox + nodeset: ubuntu-bionic + description: | + Run unit test for rally project. + + Uses tox with the ``py36`` environment. + vars: + tox_envlist: py36 + +- job: + name: rally-tox-py37 + parent: tox + nodeset: ubuntu-bionic + pre-run: tests/ci/playbooks/pre-run-tox.yaml + description: | + Run unit test for rally project. + + Uses tox with the ``py37`` environment. + vars: + tox_envlist: py37 + python_version: 3.7 diff --git a/zuul.yaml b/.zuul.d/zuul.yaml similarity index 64% rename from zuul.yaml rename to .zuul.d/zuul.yaml index 795aa7d0d3..04b12275ca 100644 --- a/zuul.yaml +++ b/.zuul.d/zuul.yaml @@ -5,6 +5,13 @@ run: tests/ci/playbooks/rally-install/run.yaml timeout: 1800 +- job: + name: rally-install-ubuntu-bionic + parent: base + nodeset: ubuntu-bionic + run: tests/ci/playbooks/rally-install/run.yaml + timeout: 1800 + - job: name: rally-install-centos-7 parent: base @@ -19,29 +26,27 @@ run: tests/ci/playbooks/rally-database-migration/run.yaml timeout: 1800 -- job: - name: rally-tox-self - parent: tox - description: | - Run test for rally project. - - Uses tox with the ``self`` environment. - vars: - tox_envlist: self - - project: check: jobs: - rally-database-migration - rally-install-ubuntu-xenial + - rally-install-ubuntu-bionic - rally-install-centos-7 - - openstack-tox-functional + - rally-tox-py34: + voting: false + - rally-tox-py36: + voting: false + - rally-tox-py37: + voting: false + - rally-tox-functional - rally-tox-self gate: jobs: - rally-database-migration - rally-install-ubuntu-xenial + - rally-install-ubuntu-bionic - rally-install-centos-7 - - openstack-tox-functional + - rally-tox-functional - rally-tox-self diff --git a/tests/ci/playbooks/base/post.yaml b/tests/ci/playbooks/base/post.yaml deleted file mode 100644 index 4c699fc12a..0000000000 --- a/tests/ci/playbooks/base/post.yaml +++ /dev/null @@ -1,41 +0,0 @@ -- hosts: primary - tasks: - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/logs/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/rally-plot/** - - --include=*/ - - --exclude=* - - --prune-empty-dirs - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.log_root }}' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/rally-plot/extra/index.html - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/tests/ci/playbooks/pre-run-tox.yaml b/tests/ci/playbooks/pre-run-tox.yaml new file mode 100644 index 0000000000..1d61afaa29 --- /dev/null +++ b/tests/ci/playbooks/pre-run-tox.yaml @@ -0,0 +1,15 @@ + +- hosts: all + name: Installs all required packages + tasks: + - name: Install the proper python version + become: True + become_user: root + shell: + executable: /bin/sh + cmd: | + set -e + + add-apt-repository ppa:deadsnakes/ppa --yes + apt-get update + apt-get install python{{python_version}}-dev --yes diff --git a/tox.ini b/tox.ini index bfd584115e..5449a539f7 100644 --- a/tox.ini +++ b/tox.ini @@ -43,6 +43,10 @@ basepython = python3.5 basepython = python3.6 +[testenv:py37] +basepython = python3.7 + + [testenv:venv] commands = {posargs}