Add zuul jobs

Add functional and linting tests for the new project.

Change-Id: Iae103901131aef872ba7daae078813ae81b1d0d2
This commit is contained in:
Jean-Philippe Evrard 2018-06-11 08:19:54 +02:00
parent 994f461f13
commit 6ce64bb2eb
3 changed files with 50 additions and 1 deletions

View File

@ -44,9 +44,21 @@
repo: deb [arch=amd64] {{ item.uri }} {{ ansible_distribution_release | lower }} stable repo: deb [arch=amd64] {{ item.uri }} {{ ansible_distribution_release | lower }} stable
state: present state: present
filename: "{{ item.name }}" filename: "{{ item.name }}"
update_cache: no
with_items: "{{ zun_docker_repo }}" with_items: "{{ zun_docker_repo }}"
register: add_nv_repos
- name: Update Apt cache
apt:
update_cache: yes
when: add_nv_repos is changed
register: update_apt_cache
until: update_apt_cache is success
retries: 5
delay: 2
when: when:
- ansible_pkg_mgr == 'apt' - "ansible_pkg_mgr == 'apt'"
- name: Add yum repository - name: Add yum repository
get_url: get_url:

View File

@ -19,11 +19,17 @@
tasks: tasks:
- name: Pull cirros image - name: Pull cirros image
command: docker pull cirros command: docker pull cirros
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Upload image into glance - name: Upload image into glance
shell: | shell: |
. /root/openrc . /root/openrc
docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw docker save cirros | /openstack/venvs/zun-untagged/bin/openstack image create zun-cirros --public --container-format docker --disk-format raw
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint
- name: Run zun service check - name: Run zun service check
hosts: zun_api[0] hosts: zun_api[0]
@ -33,8 +39,12 @@
shell: | shell: |
. /root/openrc . /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer service list /openstack/venvs/zun-untagged/bin/openstack appcontainer service list
changed_when: false
- name: Create zun container - name: Create zun container
shell: | shell: |
. /root/openrc . /root/openrc
/openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1 /openstack/venvs/zun-untagged/bin/openstack appcontainer run --name container-check --net network=private zun-cirros ping 127.0.0.1
# TODO(cloudnull): Set up failed_when and changed_when conditions
tags:
- skip_ansible_lint

27
zuul.d/project.yaml Normal file
View File

@ -0,0 +1,27 @@
---
# Copyright 2018, SUSE LINUX GmbH.
#
# 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.
- project:
check:
jobs:
- openstack-ansible-linters
- openstack-ansible-functional-ubuntu-xenial:
voting: false
experimental:
jobs:
- openstack-ansible-integrated-deploy-aio
gate:
jobs:
- openstack-ansible-linters