Add py3 probe tests on CentOS 8

Change-Id: Iae86d8838854023010686d3d4bed3befe6160ca5
This commit is contained in:
Tim Burke 2019-10-23 12:24:17 -07:00
parent 6e9e84a5c2
commit d186af14fa
5 changed files with 55 additions and 11 deletions

View File

@ -244,7 +244,10 @@
nodeset: centos-7 nodeset: centos-7
description: | description: |
Setup a SAIO dev environment and run Swift's probe tests Setup a SAIO dev environment and run Swift's probe tests
under Python 2.
timeout: 7200 timeout: 7200
vars:
bindep_profile: test py27
pre-run: pre-run:
- tools/playbooks/common/install_dependencies.yaml - tools/playbooks/common/install_dependencies.yaml
- tools/playbooks/saio_single_node_setup/setup_saio.yaml - tools/playbooks/saio_single_node_setup/setup_saio.yaml
@ -252,6 +255,16 @@
run: tools/playbooks/probetests/run.yaml run: tools/playbooks/probetests/run.yaml
post-run: tools/playbooks/probetests/post.yaml post-run: tools/playbooks/probetests/post.yaml
- job:
name: swift-probetests-centos-8
parent: swift-probetests-centos-7
nodeset: centos-8
description: |
Setup a SAIO dev environment and run Swift's probe tests
under Python 3.
vars:
bindep_profile: test py36
- nodeset: - nodeset:
name: swift-five-nodes name: swift-five-nodes
nodes: nodes:
@ -524,6 +537,13 @@
- ^doc/(requirements.txt|(manpages|s3api|source)/.*)$ - ^doc/(requirements.txt|(manpages|s3api|source)/.*)$
- ^test/(unit|functional)/.*$ - ^test/(unit|functional)/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$ - ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$
- swift-probetests-centos-8:
irrelevant-files:
- ^(api-ref|releasenotes)/.*$
# Keep doc/saio -- we use those sample configs in the saio playbooks
- ^doc/(requirements.txt|(manpages|s3api|source)/.*)$
- ^test/(unit|functional)/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$
- swift-dsvm-functional: - swift-dsvm-functional:
irrelevant-files: irrelevant-files:
- ^(api-ref|doc|releasenotes)/.*$ - ^(api-ref|doc|releasenotes)/.*$
@ -589,6 +609,13 @@
- ^doc/(requirements.txt|(manpages|s3api|source)/.*)$ - ^doc/(requirements.txt|(manpages|s3api|source)/.*)$
- ^test/(unit|functional)/.*$ - ^test/(unit|functional)/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$ - ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$
- swift-probetests-centos-8:
irrelevant-files:
- ^(api-ref|releasenotes)/.*$
# Keep doc/saio -- we use those sample configs in the saio playbooks
- ^doc/(requirements.txt|(manpages|s3api|source)/.*)$
- ^test/(unit|functional)/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG|.*\.rst)$
- swift-dsvm-functional: - swift-dsvm-functional:
irrelevant-files: irrelevant-files:
- ^(api-ref|doc|releasenotes)/.*$ - ^(api-ref|doc|releasenotes)/.*$

View File

@ -18,9 +18,9 @@ libxslt1-dev [platform:dpkg]
libxslt-dev [platform:apk] libxslt-dev [platform:apk]
memcached memcached
python-dev [platform:dpkg platform:apk] python-dev [platform:dpkg platform:apk]
python-devel [platform:rpm] python-devel [platform:rpm !py36]
python3-dev [platform:dpkg platform:apk test] python3-dev [platform:dpkg platform:apk test]
python3-devel [platform:fedora platform:suse test] python3-devel [platform:rpm !py27 test]
# python3-devel does not pull in the python3 package on openSUSE so # python3-devel does not pull in the python3 package on openSUSE so
# we need to be explicit. The python3 package contains the XML module # we need to be explicit. The python3 package contains the XML module
# which is required by a python3 virtualenv. Similarly, in python2, # which is required by a python3 virtualenv. Similarly, in python2,

View File

@ -22,15 +22,19 @@
name: pip name: pip
extra_args: --upgrade extra_args: --upgrade
- name: installing dependencies - name: install rsync-daemon - CentOS 8
yum: name={{ item }} state=present package:
with_items: name: rsync-daemon
- python-pyeclib state: present
- python-nose when:
- python-swiftclient - ansible_facts['distribution'] == "CentOS"
- ansible_facts['distribution_major_version'] == "8"
- name: install python modules with pip - name: install python modules with pip
pip: name={{ item }} state=present extra_args='--upgrade' pip: name={{ item }} state=present extra_args='--upgrade'
with_items: with_items:
- crudini - crudini
- eventlet - eventlet
- nose
- pyeclib
- python-swiftclient

View File

@ -17,10 +17,11 @@
tasks: tasks:
- name: install swift - name: install swift
become: true become: true
shell: pip:
cmd: python setup.py develop state: present
executable: /bin/bash name: .
chdir: '{{ zuul.project.src_dir }}' chdir: '{{ zuul.project.src_dir }}'
editable: true
- name: make rings - name: make rings
shell: shell:

View File

@ -20,6 +20,11 @@ function is_rhel7 {
cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \ cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
cat /etc/*release | grep -q 'release 7' cat /etc/*release | grep -q 'release 7'
} }
function is_rhel8 {
[ -f /usr/bin/dnf ] && \
cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
cat /etc/*release | grep -q 'release 8'
}
if is_rhel7; then if is_rhel7; then
@ -28,3 +33,10 @@ if is_rhel7; then
sudo yum install -y centos-release-openstack-rocky sudo yum install -y centos-release-openstack-rocky
sudo yum install -y liberasurecode-devel sudo yum install -y liberasurecode-devel
fi fi
if is_rhel8; then
# Install CentOS OpenStack repos so that we have access to some extra
# packages.
sudo dnf install -y centos-release-openstack-ussuri
sudo dnf install -y liberasurecode-devel
fi