Browse Source

Migrate molecule jobs from centos 7 to 8

- assure we have docker installed
- add .gitreview file
- Fix Python shebangs for packaging

Change-Id: If9d78891f9b5a1615a9fb1f4251801eec1f29ed5
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
changes/52/712252/7
Gael Chamoulaud (Strider) 2 years ago
parent
commit
b6d66646b8
No known key found for this signature in database GPG Key ID: 4119D0305C651D66
  1. 4
      .gitreview
  2. 7
      releasenotes/source/index.rst
  3. 6
      releasenotes/source/ocata.rst
  4. 6
      releasenotes/source/pike.rst
  5. 6
      releasenotes/source/queens.rst
  6. 6
      releasenotes/source/rocky.rst
  7. 6
      releasenotes/source/stein.rst
  8. 6
      releasenotes/source/train.rst
  9. 1
      requirements.txt
  10. 8
      tools/test-setup.sh
  11. 2
      validations_common/library/advanced_format.py
  12. 2
      validations_common/library/check_package_update.py
  13. 2
      validations_common/library/haproxy_conf.py
  14. 2
      validations_common/library/hiera.py
  15. 2
      validations_common/library/validations_read_ini.py
  16. 2
      validations_common/library/warn.py
  17. 15
      zuul.d/base.yaml
  18. 14
      zuul.d/layout.yaml
  19. 115
      zuul.d/molecule.yaml
  20. 28
      zuul.d/playbooks/pre.yml
  21. 13
      zuul.d/playbooks/run-local.yml
  22. 20
      zuul.d/playbooks/run.yml

4
.gitreview

@ -0,0 +1,4 @@
[gerrit]
host=review.opendev.org
port=29418
project=openstack/validations-common.git

7
releasenotes/source/index.rst

@ -9,13 +9,6 @@ Contents
:maxdepth: 2
unreleased
train
stein
rocky
queens
pike
ocata
Indices and tables
==================

6
releasenotes/source/ocata.rst

@ -1,6 +0,0 @@
===================================
Ocata Series Release Notes
===================================
.. release-notes::
:branch: origin/stable/ocata

6
releasenotes/source/pike.rst

@ -1,6 +0,0 @@
===================================
Pike Series Release Notes
===================================
.. release-notes::
:branch: stable/pike

6
releasenotes/source/queens.rst

@ -1,6 +0,0 @@
===================================
Queens Series Release Notes
===================================
.. release-notes::
:branch: stable/queens

6
releasenotes/source/rocky.rst

@ -1,6 +0,0 @@
===================================
Rocky Series Release Notes
===================================
.. release-notes::
:branch: stable/rocky

6
releasenotes/source/stein.rst

@ -1,6 +0,0 @@
===================================
Stein Series Release Notes
===================================
.. release-notes::
:branch: stable/stein

6
releasenotes/source/train.rst

@ -1,6 +0,0 @@
==========================
Train Series Release Notes
==========================
.. release-notes::
:branch: stable/train

1
requirements.txt

@ -3,4 +3,3 @@
# process, which may cause wedges in the gate later.
pbr>=3.1.1 # Apache-2.0
PyYAML

8
tools/test-setup.sh

@ -0,0 +1,8 @@
#!/bin/bash
set -euxo pipefail
# Used by Zuul CI to perform extra bootstrapping
# Workaround for a potential:
# Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
# See https://docs.docker.com/install/linux/linux-postinstall/
newgrp docker || true

2
validations_common/library/advanced_format.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#

2
validations_common/library/check_package_update.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2017 Red Hat, Inc.
# All Rights Reserved.
#

2
validations_common/library/haproxy_conf.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");

2
validations_common/library/hiera.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2016 Red Hat, Inc.
# All Rights Reserved.
#

2
validations_common/library/validations_read_ini.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");

2
validations_common/library/warn.py

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright 2017 Red Hat, Inc.
# All Rights Reserved.
#

15
zuul.d/base.yaml

@ -0,0 +1,15 @@
---
- 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
- zuul.d/playbooks/pre.yml
run:
- zuul.d/playbooks/run.yml
timeout: 1800
voting: true

14
zuul.d/layout.yaml

@ -0,0 +1,14 @@
- project:
templates:
- openstack-python3-ussuri-jobs
- validations-common-molecule-jobs
- check-requirements
- release-notes-jobs-python3
check:
jobs:
- openstack-tox-linters
- openstack-tox-lower-constraints
gate:
jobs:
- openstack-tox-linters
- openstack-tox-lower-constraints

115
zuul.d/molecule.yaml

@ -0,0 +1,115 @@
---
- 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:
- ^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:
- ^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:
- ^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:
- ^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:
- ^roles/dns/.*
name: validations-common-centos-8-molecule-dns
parent: validations-common-centos-8-base
vars:
validations_common_role_name: dns
- job:
files:
- ^roles/haproxy/.*
name: validations-common-centos-8-molecule-haproxy
parent: validations-common-centos-8-base
vars:
validations_common_role_name: haproxy
- job:
files:
- ^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:
- ^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:
- ^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:
- ^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:
- ^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:
- ^roles/validate_selinux/.*
name: validations-common-centos-8-molecule-validate_selinux
parent: validations-common-centos-8-base
vars:
validations_common_role_name: validate_selinux

28
zuul.d/playbooks/pre.yml

@ -0,0 +1,28 @@
---
- hosts: all
pre_tasks:
- name: Ensure output dirs
file:
path: "{{ ansible_user_dir }}/zuul-output/logs"
state: directory
- 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_site_packages: true
roles:
- role: install-docker

13
zuul.d/playbooks/run-local.yml

@ -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

20
zuul.d/playbooks/run.yml

@ -0,0 +1,20 @@
---
- 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
Loading…
Cancel
Save