[ci] Add docker-check job
Add a new job to check that it is possible to build docker image for the recent version of rally-openstack Change-Id: Icbd8224c5cd0afebeb5e8e178b9ae216665607ce
This commit is contained in:
parent
5ed0bf8399
commit
f52e40d622
6
.zuul.d/rally-docker-check.yaml
Normal file
6
.zuul.d/rally-docker-check.yaml
Normal 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
|
@ -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
|
||||
|
@ -26,6 +26,16 @@ Added
|
||||
* [scenario plugin] GnocchiMetric.create_metric
|
||||
* [scenario plugin] GnocchiMetric.create_delete_metric
|
||||
|
||||
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
|
||||
~~~~~
|
||||
|
||||
|
58
tests/ci/playbooks/run-rally-docker-check.yaml
Normal file
58
tests/ci/playbooks/run-rally-docker-check.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user