swift/tools/playbooks/ceph-s3tests/run.yaml
Kota Tsuyuzaki 80001aa096 Add ceph-s3 test non-voting job
This patch added new non-voting gate job to check the s3api compatibility
via swiftstack/s3compat tool that shows the ratio of compatible S3 APIs
in the gate result for each patch. This is very useful to check the possibility
if the new incoming patch breaks S3 API compatibility unexpectedly.

Originally swift3 has this kind of the gate job but we missed the staff
while migrating from swift3 into swift upstream repo so this is the porting of that.

Note that currently the job is against to only tempauth because we don't have
custom gate jobs using keystone environment other than dsvm.

Change-Id: I6f30f74678ad35479da237361bee48c46c0ecc49
2018-09-14 22:32:34 +09:00

61 lines
2.4 KiB
YAML

# Copyright (c) 2018 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: all
tasks:
# TODO: remove this task when s3api is in the pipeline by default
- name: Add s3api in proxy-server.conf
replace:
path: "/etc/swift/proxy-server.conf"
regexp: "container_sync tempauth"
replace: "container_sync s3api tempauth"
become: true
- name: Starts main swift servers
shell: "swift-init main start"
become: true
- name: Clone s3compat repository
git:
repo: "https://github.com/swiftstack/s3compat.git"
dest: "{{ ansible_env.HOME }}/s3compat"
- name: Install s3compat requirements
pip:
requirements: "{{ ansible_env.HOME }}/s3compat/requirements.txt"
virtualenv: "{{ ansible_env.HOME }}/venv"
become: true
- name: Run s3compat tests
shell: '{{ ansible_env.HOME }}/venv/bin/python {{ ansible_env.HOME }}/s3compat/bin/run_ceph_tests.py "$@" || true'
environment:
S3TEST_CONF: "{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}/tools/playbooks/ceph-s3tests/ceph-s3.conf"
S3ACL: "true"
DNS_BUCKET_NAMES: "false"
CHECK_BUCKET_OWNER: "true"
args:
chdir: '{{ ansible_env.HOME }}/s3compat'
- name: Show report
shell: |
set -o pipefail
"{{ ansible_env.HOME }}/venv/bin/python" ./bin/get_ceph_test_attributes.py
"{{ ansible_env.HOME }}/venv/bin/python" ./bin/report.py --detailed "{{ ansible_env.HOME }}/s3compat/output/ceph-s3.out.yaml" \
--known-failures "{{ ansible_env.HOME}}/{{ zuul.project.src_dir }}/doc/s3api/conf/ceph-known-failures-tempauth.yaml" \
--detailedformat console "{{ ansible_env.HOME }}/s3compat/output/ceph-s3.out.xml" | \
tee "{{ ansible_env.HOME }}/s3compat/output/ceph-s3-summary.log"
args:
chdir:
"{{ ansible_env.HOME }}/s3compat"