Add molecule tests runs back in the CI
This patch reverts files which have been deleted with [1].
It also adds back the openstack-tox-linters job in the check queue.
[1] b706d7c7c9
Change-Id: Idd3bdb4aecf59ba20992e9c499efd8767e9d06be
This commit is contained in:
parent
0ae6673343
commit
9d84a07807
132
.zuul.yaml
132
.zuul.yaml
|
@ -16,15 +16,147 @@
|
|||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
|
||||
- job:
|
||||
description: Base validations-common job
|
||||
name: validations-common-centos-8-base
|
||||
nodeset: centos-8
|
||||
parent: base
|
||||
success-url: "reports.html"
|
||||
failure-url: "reports.html"
|
||||
pre-run:
|
||||
- tests/prepare-test-host.yml
|
||||
- playbooks/molecule/pre.yml
|
||||
run:
|
||||
- playbooks/molecule/run.yml
|
||||
timeout: 1800
|
||||
voting: true
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-lower-constraints-jobs
|
||||
- openstack-python3-victoria-jobs
|
||||
- validations-common-molecule-jobs
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- validations-common-functional
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- validations-common-functional
|
||||
|
||||
- project-template:
|
||||
check:
|
||||
jobs:
|
||||
- validations-common-centos-8-molecule-advanced_format_512e_support
|
||||
- validations-common-centos-8-molecule-check_latest_packages_version
|
||||
- validations-common-centos-8-molecule-dns
|
||||
- validations-common-centos-8-molecule-haproxy
|
||||
- validations-common-centos-8-molecule-ntp
|
||||
- validations-common-centos-8-molecule-service_status
|
||||
- validations-common-centos-8-molecule-check_cpu
|
||||
- validations-common-centos-8-molecule-check_disk_space
|
||||
- validations-common-centos-8-molecule-check_ram
|
||||
- validations-common-centos-8-molecule-check_selinux_mode
|
||||
- validations-common-centos-8-molecule-validate_selinux
|
||||
- validations-common-centos-8-molecule-xfs_check_ftype
|
||||
gate:
|
||||
jobs:
|
||||
- validations-common-centos-8-molecule-check_latest_packages_version
|
||||
- validations-common-centos-8-molecule-dns
|
||||
- validations-common-centos-8-molecule-haproxy
|
||||
- validations-common-centos-8-molecule-check_cpu
|
||||
- validations-common-centos-8-molecule-check_disk_space
|
||||
- validations-common-centos-8-molecule-check_ram
|
||||
- validations-common-centos-8-molecule-validate_selinux
|
||||
name: validations-common-molecule-jobs
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/check_selinux_mode/.*
|
||||
name: validations-common-centos-8-molecule-check_selinux_mode
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: check_selinux_mode
|
||||
voting: false
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/ntp/.*
|
||||
name: validations-common-centos-8-molecule-ntp
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: ntp
|
||||
voting: false
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/service_status/.*
|
||||
name: validations-common-centos-8-molecule-service_status
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: service_status
|
||||
voting: false
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/advanced_format_512e_support/.*
|
||||
name: validations-common-centos-8-molecule-advanced_format_512e_support
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: advanced_format_512e_support
|
||||
voting: false
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/dns/.*
|
||||
name: validations-common-centos-8-molecule-dns
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: dns
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/haproxy/.*
|
||||
name: validations-common-centos-8-molecule-haproxy
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: haproxy
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/check_cpu/.*
|
||||
name: validations-common-centos-8-molecule-check_cpu
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: check_cpu
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/check_ram/.*
|
||||
name: validations-common-centos-8-molecule-check_ram
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: check_ram
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/check_disk_space/.*
|
||||
name: validations-common-centos-8-molecule-check_disk_space
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: check_disk_space
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/xfs_check_ftype/.*
|
||||
name: validations-common-centos-8-molecule-xfs_check_ftype
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: xfs_check_ftype
|
||||
voting: false
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/check_latest_packages_version/.*
|
||||
name: validations-common-centos-8-molecule-check_latest_packages_version
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: check_latest_packages_version
|
||||
- job:
|
||||
files:
|
||||
- ^validations_common/roles/validate_selinux/.*
|
||||
name: validations-common-centos-8-molecule-validate_selinux
|
||||
parent: validations-common-centos-8-base
|
||||
vars:
|
||||
validations_common_role_name: validate_selinux
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
- hosts: all
|
||||
pre_tasks:
|
||||
- name: Ensure output dirs
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/zuul-output/logs"
|
||||
state: directory
|
||||
|
||||
- name: Ensure pip is available
|
||||
include_role:
|
||||
name: ensure-pip
|
||||
|
||||
- name: Ensure virtualenv is available
|
||||
include_role:
|
||||
name: ensure-virtualenv
|
||||
|
||||
- name: Setup bindep
|
||||
pip:
|
||||
name: "bindep"
|
||||
virtualenv: "{{ ansible_user_dir }}/test-python"
|
||||
virtualenv_site_packages: true
|
||||
|
||||
- name: Run bindep
|
||||
shell: |-
|
||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||
{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/scripts/bindep-install
|
||||
become: true
|
||||
changed_when: false
|
||||
|
||||
- name: Setup test-python
|
||||
pip:
|
||||
requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt"
|
||||
virtualenv: "{{ ansible_user_dir }}/test-python"
|
||||
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
||||
virtualenv_site_packages: true
|
||||
|
||||
- name: Display test-python virtualenv package versions
|
||||
shell: |-
|
||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||
pip freeze
|
||||
|
||||
- name: Basic ci setup
|
||||
become: true
|
||||
block:
|
||||
- name: Ensure ci directories
|
||||
file:
|
||||
path: "/etc/ci"
|
||||
state: "directory"
|
||||
|
||||
- name: Ensure ci mirror file
|
||||
file:
|
||||
path: "/etc/ci/mirror_info.sh"
|
||||
state: "touch"
|
||||
|
||||
- name: Set an appropriate fs.file-max
|
||||
sysctl:
|
||||
name: fs.file-max
|
||||
value: 2048000
|
||||
sysctl_set: true
|
||||
state: present
|
||||
reload: true
|
||||
|
||||
- name: Set container_manage_cgroup boolean
|
||||
seboolean:
|
||||
name: container_manage_cgroup
|
||||
state: true
|
||||
persistent: true
|
||||
failed_when: false
|
||||
|
||||
- name: Create limits file for containers
|
||||
copy:
|
||||
content: |
|
||||
* soft nofile 102400
|
||||
* hard nofile 204800
|
||||
* soft nproc 2048
|
||||
* hard nproc 4096
|
||||
dest: /etc/security/limits.d/containers.conf
|
||||
|
||||
- name: Reset ssh connection
|
||||
meta: reset_connection
|
||||
roles:
|
||||
- role: ensure-docker
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: set basic zuul fact
|
||||
set_fact:
|
||||
zuul:
|
||||
project:
|
||||
src_dir: "{{ tripleo_src }}"
|
||||
ansible_connection: ssh
|
||||
|
||||
- import_playbook: pre.yml
|
||||
|
||||
- import_playbook: run.yml
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- hosts: all
|
||||
environment:
|
||||
ANSIBLE_LOG_PATH: "{{ ansible_user_dir }}/zuul-output/logs/ansible-execution.log"
|
||||
tasks:
|
||||
- name: Run role test job
|
||||
shell: |-
|
||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||
. {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/ansible-test-env.rc
|
||||
pytest --color=no \
|
||||
--html={{ ansible_user_dir }}/zuul-output/logs/reports.html \
|
||||
--self-contained-html \
|
||||
--ansible-args='{{ tripleo_job_ansible_args | default("") }}' \
|
||||
{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/test_molecule.py
|
||||
args:
|
||||
chdir:
|
||||
"{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/validations_common/roles/{{ validations_common_role_name }}"
|
||||
executable: /bin/bash
|
||||
changed_when: false
|
|
@ -67,4 +67,4 @@ ansible-playbook -i "${PROJECT_DIR}/tests/hosts.ini" \
|
|||
-e "ansible_user=${USER}" \
|
||||
-e "ansible_user_dir=${HOME}" \
|
||||
"${PROJECT_DIR}/tests/prepare-test-host.yml" \
|
||||
"${PROJECT_DIR}/zuul.d/playbooks/run-local.yml"
|
||||
"${PROJECT_DIR}/playbooks/molecule/run-local.yml"
|
||||
|
|
Loading…
Reference in New Issue