From d3af87c731cdc8c7d438d5913a4413090f72b130 Mon Sep 17 00:00:00 2001
From: Rafael Guterres Jeffman <rjeffman@redhat.com>
Date: Mon, 9 May 2022 14:01:31 -0300
Subject: [PATCH] upstream CI: removed all CentOS 8 support.

CentOS 8 images are not supported anymore, and we are using CentOS 8
Stream images.

This patch removes all configuration for CentOS 8 and updates test
README to point to the available container images.
---
 molecule/centos-8-build/molecule.yml | 19 --------------
 molecule/centos-8/molecule.yml       | 19 --------------
 molecule/default                     |  2 +-
 tests/README.md                      | 10 +++++---
 tests/azure/azure-pipelines.yml      | 10 --------
 tests/azure/build-containers.yml     |  6 -----
 tests/azure/nightly.yml              | 37 ----------------------------
 7 files changed, 7 insertions(+), 96 deletions(-)
 delete mode 100644 molecule/centos-8-build/molecule.yml
 delete mode 100644 molecule/centos-8/molecule.yml

diff --git a/molecule/centos-8-build/molecule.yml b/molecule/centos-8-build/molecule.yml
deleted file mode 100644
index 5698e8c0..00000000
--- a/molecule/centos-8-build/molecule.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-driver:
-  name: docker
-platforms:
-  - name: centos-8-build
-    image: "centos:centos8"
-    pre_build_image: true
-    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
-prerun: false
diff --git a/molecule/centos-8/molecule.yml b/molecule/centos-8/molecule.yml
deleted file mode 100644
index 6d043503..00000000
--- a/molecule/centos-8/molecule.yml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-driver:
-  name: docker
-platforms:
-  - name: centos-8
-    image: quay.io/ansible-freeipa/upstream-tests:centos-8
-    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
diff --git a/molecule/default b/molecule/default
index df5ea5dd..768be926 120000
--- a/molecule/default
+++ b/molecule/default
@@ -1 +1 @@
-centos-8
\ No newline at end of file
+fedora-latest
\ No newline at end of file
diff --git a/tests/README.md b/tests/README.md
index b1a3168e..631a37c8 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -92,19 +92,21 @@ pip install molecule[docker]>=3
 
 Now you can start a test container using the following command:
 ```
-molecule create -s centos-8
+molecule create -s c8s
 ```
 
 Note: Currently the containers available for running the tests are:
+ * fedora-latest
  * centos-7
- * centos-8
+ * c8s
+ * c9s
 
 ### Running the tests inside the container
 
 To run the tests you will use pytest (works the same as for VMs).
 
 ```
-RUN_TESTS_IN_DOCKER=1 IPA_SERVER_HOST=centos-8 pytest
+RUN_TESTS_IN_DOCKER=1 IPA_SERVER_HOST=c8s pytest
 ```
 
 ### Cleaning up after tests
@@ -112,7 +114,7 @@ RUN_TESTS_IN_DOCKER=1 IPA_SERVER_HOST=centos-8 pytest
 After running the tests you should probably destroy the test container using:
 
 ```
-molecule destroy -s centos-8
+molecule destroy -s c8s
 ```
 
 See [Running the tests](#running-the-tests) section for more information on available options.
diff --git a/tests/azure/azure-pipelines.yml b/tests/azure/azure-pipelines.yml
index 3e40c32c..29af6133 100644
--- a/tests/azure/azure-pipelines.yml
+++ b/tests/azure/azure-pipelines.yml
@@ -40,16 +40,6 @@ stages:
       scenario: c8s
       ansible_version: ">=2.9,<2.10"
 
-# # CentOS 8
-#
-# - stage: CentOS8_Ansible_2_9
-#   dependsOn: []
-#   jobs:
-#   - template: templates/group_tests.yml
-#     parameters:
-#       build_number: $(Build.BuildNumber)
-#       scenario: centos-8
-#       ansible_version: ">=2.9,<2.10"
 
 # CentOS 7
 
diff --git a/tests/azure/build-containers.yml b/tests/azure/build-containers.yml
index e5d8609a..38bcce4f 100644
--- a/tests/azure/build-containers.yml
+++ b/tests/azure/build-containers.yml
@@ -21,12 +21,6 @@ jobs:
     container_name: centos-7
     build_scenario_name: centos-7-build
 
-# - template: templates/build_container.yml
-#   parameters:
-#     job_name_suffix: Centos8
-#     container_name: centos-8
-#     build_scenario_name: centos-8-build
-
 - template: templates/build_container.yml
   parameters:
     job_name_suffix: C8S
diff --git a/tests/azure/nightly.yml b/tests/azure/nightly.yml
index 15ace521..f7b19a39 100644
--- a/tests/azure/nightly.yml
+++ b/tests/azure/nightly.yml
@@ -128,43 +128,6 @@ stages:
       scenario: c8s
       ansible_version: ""
 
-# # CentOS 8
-#
-# - stage: CentOS8_Ansible_2_9
-#   dependsOn: []
-#   jobs:
-#   - template: templates/group_tests.yml
-#     parameters:
-#       build_number: $(Build.BuildNumber)
-#       scenario: centos-8
-#       ansible_version: ">=2.9,<2.10"
-#
-# - stage: CentOS8_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: CentOS8_Ansible_Core_2_12
-#   dependsOn: []
-#   jobs:
-#   - template: templates/group_tests.yml
-#     parameters:
-#       build_number: $(Build.BuildNumber)
-#       scenario: centos-8
-#       ansible_version: "-core >=2.12,<2.13"
-#
-# - stage: CentOS8_Ansible_latest
-#   dependsOn: []
-#   jobs:
-#   - template: templates/group_tests.yml
-#     parameters:
-#       build_number: $(Build.BuildNumber)
-#       scenario: centos-8
-#       ansible_version: ""
 
 # CentOS 7
 
-- 
GitLab