upstream CI: Enable CentOS 8 Stream for PR and nightly tests.

Add configuration to build a testing CentOS 8 stream image and to
execute upstream tests using that image in pull requests (Ansible
2.9) and on the nightly tests (all supported Ansible versions).
This commit is contained in:
Rafael Guterres Jeffman
2022-01-17 09:23:06 -03:00
parent e681f25e5c
commit 998a141482
6 changed files with 125 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
FROM quay.io/centos/centos:stream8
ENV container=docker
RUN rm -fv /var/cache/dnf/metadata_lock.pid; \
dnf makecache; \
dnf --assumeyes install \
/usr/bin/python3 \
/usr/bin/python3-config \
/usr/bin/dnf-3 \
sudo \
bash \
systemd \
procps-ng \
iproute && \
dnf clean all; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*; \
rm -rf /var/cache/dnf/;
STOPSIGNAL RTMIN+3
VOLUME ["/sys/fs/cgroup"]
CMD ["/usr/sbin/init"]

View File

@@ -0,0 +1,18 @@
---
driver:
name: docker
platforms:
- name: c8s-build
image: "quay.io/centos/centos:stream8"
dockerfile: Dockerfile
hostname: ipaserver.test.local
dns_servers:
- 8.8.8.8
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /usr/sbin/init
privileged: true
provisioner:
name: ansible
playbooks:
prepare: ../resources/playbooks/prepare-build.yml

19
molecule/c8s/molecule.yml Normal file
View File

@@ -0,0 +1,19 @@
---
driver:
name: docker
platforms:
- name: c8s
image: quay.io/ansible-freeipa/upstream-tests:c8s
pre_build_image: true
hostname: ipaserver.test.local
dns_servers:
- 127.0.0.1
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
command: /usr/sbin/init
privileged: true
provisioner:
name: ansible
playbooks:
prepare: ../resources/playbooks/prepare.yml
prerun: false

View File

@@ -18,9 +18,9 @@ stages:
scenario: fedora-latest
ansible_version: ">=2.9,<2.10"
# CentOS 9
# CentOS 9 Stream
- stage: CentOS9_Ansible_2_9
- stage: c9s_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
@@ -29,6 +29,17 @@ stages:
scenario: centos-9
ansible_version: ">=2.9,<2.10"
# CentOS 8 Stream
- stage: c8s_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c8s
ansible_version: ">=2.9,<2.10"
# CentOS 8
- stage: CentOS8_Ansible_2_9

View File

@@ -27,6 +27,12 @@ jobs:
container_name: centos-8
build_scenario_name: centos-8-build
- template: templates/build_container.yml
parameters:
job_name_suffix: C8S
container_name: c8s
build_scenario_name: c8s-build
- template: templates/build_container.yml
parameters:
job_name_suffix: Centos9

View File

@@ -52,7 +52,7 @@ stages:
scenario: fedora-latest
ansible_version: ""
# CentoOS 9
# CentoOS 9 Stream
- stage: CentOS9_Ansible_2_9
dependsOn: []
@@ -81,6 +81,44 @@ stages:
scenario: centos-9
ansible_version: ""
# CentOS 8 Stream
- stage: c8s_Ansible_2_9
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c8s
ansible_version: ">=2.9,<2.10"
- stage: c8s_Ansible_Core_2_11
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: centos-8
ansible_version: "-core >=2.11,<2.12"
- stage: c8s_Ansible_Core_2_12
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c8s
ansible_version: "-core >=2.12,<2.13"
- stage: c8s_Ansible_latest
dependsOn: []
jobs:
- template: templates/group_tests.yml
parameters:
build_number: $(Build.BuildNumber)
scenario: c8s
ansible_version: ""
# CentOS 8
- stage: CentOS8_Ansible_2_9