Molecule test restoration
Setting molecule to use centos8 stream instead of UBI8. Changing nodeset of the CI jobs to centos8 stream. Also reenables the end-of-file-fixer and simplifies testenvs Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I9da5b306d59e1aab3b9fd9d9db7294b1c69655be
This commit is contained in:
parent
558200c8d8
commit
ae303b9aae
@ -21,15 +21,17 @@ FROM {{ item.registry.url }}/{{ item.image }}
|
||||
FROM {{ item.image }}
|
||||
{% endif %}
|
||||
|
||||
RUN dnf makecache && dnf install -y sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }}
|
||||
# TODO(gchamoul): find a better to get always the latest version of those rpms
|
||||
# below from the centos mirror
|
||||
RUN dnf install -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
|
||||
RUN dnf install -y http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm && dnf install -y epel-release && dnf clean all
|
||||
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
|
||||
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash epel-release {{ item.pkg_extras | default('') }} && dnf clean all; \
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi
|
||||
|
||||
{% for pkg in item.easy_install | default([]) %}
|
||||
# install pip for centos where there is no python-pip rpm in default repos
|
||||
RUN easy_install {{ pkg }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
CMD ["sh", "-c", "while true; do sleep 10000; done"]
|
||||
|
@ -12,9 +12,9 @@
|
||||
# you will have to redefine them completely in your molecule.yml (at the role
|
||||
# level) and add your extra configuration!
|
||||
#
|
||||
# For instance, if you need to add an extra package in your ubi8 container, you
|
||||
# will have to add the entire "platforms" key into your molecule.yml file and
|
||||
# add your package name in the pkg_extras key.
|
||||
# For instance, if you need to add an extra package in your CentOS 8 Stream
|
||||
# container, you will have to add the entire "platforms" key into your
|
||||
# molecule.yml file and add your package name in the pkg_extras key.
|
||||
#
|
||||
# No merge will happen between your molecule.yml and this config.yml
|
||||
# files. That's why you will have to redefine them completely.
|
||||
@ -25,11 +25,11 @@ driver:
|
||||
log: true
|
||||
|
||||
platforms:
|
||||
- name: ubi8
|
||||
hostname: ubi8
|
||||
image: ubi8/ubi-init
|
||||
- name: centos
|
||||
hostname: centos
|
||||
image: centos/centos:stream8
|
||||
registry:
|
||||
url: registry.access.redhat.com
|
||||
url: quay.io
|
||||
dockerfile: ../../../../../.config/molecule/Dockerfile
|
||||
pkg_extras: python*-setuptools python*-pyyaml
|
||||
volumes:
|
||||
@ -47,7 +47,7 @@ provisioner:
|
||||
hosts:
|
||||
all:
|
||||
hosts:
|
||||
ubi8:
|
||||
centos:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
log: true
|
||||
options:
|
||||
@ -67,4 +67,4 @@ scenario:
|
||||
- destroy
|
||||
|
||||
verifier:
|
||||
name: testinfra
|
||||
name: ansible
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
- job:
|
||||
name: validations-common-reqcheck
|
||||
nodeset: centos-8
|
||||
nodeset: centos-8-stream
|
||||
parent: base
|
||||
run: playbooks/reqcheck.yaml
|
||||
timeout: 1600
|
||||
@ -30,7 +30,7 @@
|
||||
- ^requirements.txt$
|
||||
- job:
|
||||
name: validations-common-coverchange
|
||||
nodeset: centos-8
|
||||
nodeset: centos-8-stream
|
||||
parent: base
|
||||
run: playbooks/coverchange.yaml
|
||||
timeout: 1600
|
||||
@ -43,7 +43,7 @@
|
||||
- job:
|
||||
description: Base validations-common job
|
||||
name: validations-common-centos-8-base
|
||||
nodeset: centos-8
|
||||
nodeset: centos-8-stream
|
||||
parent: base
|
||||
success-url: "reports.html"
|
||||
failure-url: "reports.html"
|
||||
|
1
LICENSE
1
LICENSE
@ -173,4 +173,3 @@
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
|
@ -25,6 +25,13 @@
|
||||
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
||||
virtualenv_site_packages: true
|
||||
|
||||
- name: Set containers module to 3.0
|
||||
become: true
|
||||
shell: |
|
||||
dnf module disable container-tools:rhel8 -y
|
||||
dnf module enable container-tools:3.0 -y
|
||||
dnf clean metadata
|
||||
|
||||
- name: Run bindep
|
||||
shell: |-
|
||||
. {{ ansible_user_dir }}/test-python/bin/activate
|
||||
|
@ -42,4 +42,4 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then
|
||||
sudo "${RHT_PKG_MGR}" install -y ${BINDEP_PKGS}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
@ -2,6 +2,7 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
ansible-core<2.12 # GPLv3+
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=3.0.1 # Apache-2.0
|
||||
|
@ -1 +1 @@
|
||||
test ansible_connection=local ansible_host=localhost
|
||||
test ansible_connection=local ansible_host=localhost
|
||||
|
21
tox.ini
21
tox.ini
@ -39,7 +39,6 @@ deps =
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
-r {toxinidir}/doc/requirements.txt
|
||||
ansible-core<2.12 # GPLv3+
|
||||
whitelist_externals =
|
||||
bash
|
||||
ansible-galaxy
|
||||
@ -59,7 +58,6 @@ deps =
|
||||
-c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
ansible-core<2.12
|
||||
whitelist_externals =
|
||||
bash
|
||||
cp
|
||||
@ -90,7 +88,6 @@ deps =
|
||||
commands =
|
||||
bash -c "ANSIBLE_ROLES_PATH='{toxinidir}/validations_common/roles'"
|
||||
bash -c "ANSIBLE_LIBRARY='{toxinidir}/validations_common/library'"
|
||||
ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml
|
||||
python -m pre_commit run ansible-lint -a
|
||||
|
||||
[testenv:yamllint]
|
||||
@ -117,12 +114,19 @@ deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run check-executables-have-shebangs -a
|
||||
|
||||
[testenv:end-of-file]
|
||||
envdir = {toxworkdir}/linters
|
||||
deps = {[testenv:linters]deps}
|
||||
commands =
|
||||
python -m pre_commit run end-of-file-fixer -a
|
||||
|
||||
[testenv:linters]
|
||||
commands_pre =
|
||||
ansible-galaxy install -fr {toxinidir}/ansible-collections-requirements.yml
|
||||
deps =
|
||||
-c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
ansible-core<2.12 # GPLv3+
|
||||
commands =
|
||||
python '{toxinidir}/tools/validate-files.py' .
|
||||
{[testenv:ansible-lint]commands}
|
||||
@ -130,6 +134,7 @@ commands =
|
||||
{[testenv:bashate]commands}
|
||||
{[testenv:whitespace]commands}
|
||||
{[testenv:shebangs]commands}
|
||||
{[testenv:end-of-file]commands}
|
||||
|
||||
[testenv:releasenotes]
|
||||
deps = -r {toxinidir}/doc/requirements.txt
|
||||
@ -160,12 +165,12 @@ commands=
|
||||
sphinx-build -a -E -W -d doc/build/doctrees --keep-going -b html doc/source doc/build/html -T
|
||||
doc8 doc
|
||||
|
||||
[testenv:pdf-docs]
|
||||
[pdf-docs]
|
||||
whitelist_externals = make
|
||||
description =
|
||||
Build PDF documentation.
|
||||
envdir = {toxworkdir}/docs
|
||||
deps = {[testenv:docs]deps}
|
||||
deps = {[docs]deps}
|
||||
commands =
|
||||
sphinx-build -b latex doc/source doc/build/pdf
|
||||
make -C doc/build/pdf
|
||||
@ -178,5 +183,9 @@ ignore = D001
|
||||
[ansible]
|
||||
description = Used as base for all tox-ansible environments
|
||||
scenario_format = $parent-$nondefault_name
|
||||
deps =
|
||||
-c {env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||
-r {toxinidir}/requirements.txt
|
||||
-r {toxinidir}/test-requirements.txt
|
||||
molecule_opts =
|
||||
--debug
|
||||
|
@ -3,11 +3,11 @@
|
||||
# To override default values, please take a look at the config.yml.
|
||||
|
||||
platforms:
|
||||
- name: ubi8
|
||||
hostname: ubi8
|
||||
image: ubi8/ubi-init
|
||||
- name: centos8
|
||||
hostname: centos8
|
||||
image: centos/centos:stream8
|
||||
registry:
|
||||
url: registry.access.redhat.com
|
||||
url: quay.io
|
||||
dockerfile: ../../../../../.config/molecule/Dockerfile
|
||||
command: /sbin/init
|
||||
pkg_extras: python*-setuptools python*-pyyaml
|
||||
|
@ -6,11 +6,11 @@ driver:
|
||||
name: docker
|
||||
|
||||
platforms:
|
||||
- name: ubi8
|
||||
hostname: ubi8
|
||||
image: ubi8/ubi-init
|
||||
- name: centos8
|
||||
hostname: centos8
|
||||
image: centos/centos:stream8
|
||||
registry:
|
||||
url: registry.access.redhat.com
|
||||
url: quay.io
|
||||
dockerfile: ../../../../../.config/molecule/Dockerfile
|
||||
pkg_extras: python*-setuptools python*-pyyaml python*-libselinux
|
||||
command: /sbin/init
|
||||
|
@ -3,11 +3,11 @@
|
||||
# To override default values, please take a look at the config.yml.
|
||||
|
||||
platforms:
|
||||
- name: ubi8
|
||||
hostname: ubi8
|
||||
image: ubi8/ubi-init
|
||||
- name: centos8
|
||||
hostname: centos8
|
||||
image: centos/centos:stream8
|
||||
registry:
|
||||
url: registry.access.redhat.com
|
||||
url: quay.io
|
||||
dockerfile: ../../../../../.config/molecule/Dockerfile
|
||||
pkg_extras: python*-setuptools python*-pyyaml
|
||||
volumes:
|
||||
|
Loading…
Reference in New Issue
Block a user