Merge "[ci] Add docker-check job"

This commit is contained in:
Zuul 2018-04-17 17:15:47 +00:00 committed by Gerrit Code Review
commit c1c7111ba3
4 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,6 @@
- job:
name: rally-docker-check
parent: base
nodeset: ubuntu-xenial
run: tests/ci/playbooks/run-rally-docker-check.yaml
timeout: 1800

View File

@ -34,6 +34,7 @@
- rally-tox-pep8
- rally-tox-py27
- rally-tox-py35
- rally-docker-check
- rally-task-simple-job
- rally-task-basic-with-existing-users:
# use_existing_users key did not trigger proper ansible tasks
@ -80,6 +81,7 @@
- rally-tox-pep8
- rally-tox-py27
- rally-tox-py35
- rally-docker-check
- rally-task-simple-job
- rally-task-heat
- rally-task-ironic

View File

@ -27,6 +27,16 @@ Added
* [scenario plugin] GnocchiMetric.create_delete_metric
* [scenario plugin] GnocchiResource.create_resource
Changed
~~~~~~~
* `Docker image <https://hub.docker.com/r/xrally/xrally-openstack>`_ ported
to publish images from `rally-openstack
<https://github.com/openstack/rally-openstack>`_ repo instead of using the
rally framework repository.
Also, the CI is extended to check ability to build Docker image for any of
changes.
Fixed
~~~~~

View File

@ -0,0 +1,58 @@
- hosts: all
name: Performs checks for building rally-openstack docker image
tasks:
- name: Install docker
become: True
become_user: root
shell:
executable: /bin/sh
cmd: |
set -e
apt-get update
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-cache policy docker-engine
apt-get install -y docker-engine
- name: Check docker service status
become: True
become_user: root
command: systemctl status docker
- name: Build rally-openstack image
become: True
become_user: root
shell: "cd {{ zuul.project.src_dir }} && docker build -t xrally/xrally-openstack ./"
- name: Create Docker volume as for persistant Rally container storage
become: True
become_user: root
command: "docker volume create --name rally_volume"
- name: Create an Environment
become: True
become_user: root
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env create --name "special_env_name"
- name: List all available environments
become: True
become_user: root
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env list
register: env_list
# Check availability of that environment (check that volume stores Rally database)
- fail:
msg: There is no created environment available.
when: '"special_env_name" not in env_list.stdout'
- name: Check loading of rally-openstack plugin
become: True
become_user: root
# this plugin was added with rally-openstack 1.1.0
command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack plugin show GnocchiMetric.list_metric