From 90b18177bca0b1bf8ab60722cb75316fc304de99 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 5 Mar 2022 14:26:28 -2100 Subject: [PATCH 01/36] [CI] GitHub Action tests --- .github/workflows/tests.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..eef5d755e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,24 @@ +name: CI +on: [push, pull_request] +jobs: + tests: + strategy: + fail-fast: false + matrix: + platform: + - ubuntu-latest + - macos-latest + playbook: + - user.yml + - root.yml + runs-on: ${{ matrix.platform }} + defaults: + run: + working-directory: scripts + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v2 + with: + cache: 'pip' + cache-dependency-path: | + .github/workflows/tests.yml \ No newline at end of file From 4da22daaf8b3376cfb874c355a5085046a1f3b38 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Mon, 7 Mar 2022 09:14:38 -2100 Subject: [PATCH 02/36] [DOC] Switch build badge to read from the GitHub Action --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 013184772..44c98aa8b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/rvm/rvm1-ansible.svg?branch=master)](https://travis-ci.org/rvm/rvm1-ansible) +[![Build Status](https://github.com/rvm/rvm1-ansible/actions/workflows/tests.yml/badge.svg)](https://github.com/rvm/rvm1-ansible/actions/workflows/tests.yml) [![OpenCollective](https://opencollective.com/rvm/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/rvm/sponsors/badge.svg)](#sponsors) [![Ansible Role](https://img.shields.io/badge/role-rvm_io-red)](https://galaxy.ansible.com/rvm/ruby) From 3246f2963b0f3ffeaf87ba1e8c08f7552eb8432c Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sun, 13 Mar 2022 18:06:43 -0400 Subject: [PATCH 03/36] [CI] Basic test setup --- .github/workflows/tests.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eef5d755e..ea81cef02 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,24 +1,33 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - develop + - main + - master + pull_request: + schedule: + - cron: '46 3 20 * *' jobs: tests: strategy: fail-fast: false matrix: - platform: - - ubuntu-latest - - macos-latest playbook: - user.yml - root.yml - runs-on: ${{ matrix.platform }} + runs-on: ubuntu-latest defaults: run: - working-directory: scripts + working-directory: tests steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v2 with: cache: 'pip' cache-dependency-path: | - .github/workflows/tests.yml \ No newline at end of file + .github/workflows/tests.yml + - name: Launch containers + run: docker-compose up -d + - name: Run Ansible on all containers + run: ansible-playbook $playbook From 89645d5e9853d6b051f29e08c2f2972026d680a6 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sun, 13 Mar 2022 18:19:37 -0400 Subject: [PATCH 04/36] [CI] Remove Travis-CI config --- .travis.yml | 55 ----------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 85469a186..000000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -language: generic - -sudo: required - -env: - global: - - DOCKER_CACHE_DIR=$HOME/docker - - DOCKER_COMPOSE_VERSION=1.26.2 - - ANSIBLE_VERSION=2.9.9 - jobs: - - PLATFORM=centos PLAYBOOK=user.yml - - PLATFORM=debian PLAYBOOK=user.yml - - PLATFORM=ubuntu PLAYBOOK=user.yml - - PLATFORM=centos PLAYBOOK=root.yml - - PLATFORM=debian PLAYBOOK=root.yml - - PLATFORM=ubuntu PLAYBOOK=root.yml - -services: - - docker - -cache: - pip: true - directories: - - $DOCKER_CACHE_DIR - -before_install: - - set -e # Let's fail fast (as Travis CI doesn't by default, see travis-ci/travis-ci#1066) - - if [[ -d $DOCKER_CACHE_DIR ]]; then ls $DOCKER_CACHE_DIR/tests_$PLATFORM*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi - - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-`uname -s`-`uname -m` > docker-compose - - chmod +x docker-compose - - sudo mv docker-compose /usr/local/bin - -install: - - sudo pip install ansible==$ANSIBLE_VERSION > /dev/null 2>&1 - -script: - - cd tests - - docker-compose config --services | grep $PLATFORM | xargs docker-compose up -d - - ansible-playbook $PLAYBOOK -l $PLATFORM - -before_cache: - # Put docker images used during this run into travis cache (if not already cached). - # Tarballs are named after the pattern -.tar.gz, - # to allow "filtering" by platform type (e.g. only import debian images from cache). - - > - mkdir -p $DOCKER_CACHE_DIR && docker images -a --filter='dangling=false' --format '{{.Repository}} {{.ID}}' "tests_$PLATFORM*" - | xargs -n 2 -t sh -c 'test -e $DOCKER_CACHE_DIR/$0-$1.tar.gz || docker save $0 | gzip -2 > $DOCKER_CACHE_DIR/$0-$1.tar.gz' - # Show cache usage details (useful to know if a cache cleanup is needed) - - du -hs $DOCKER_CACHE_DIR/* - - du -hs $DOCKER_CACHE_DIR - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ From 152c920d06fad2834e9da04eea51d047751de432 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 16 Mar 2022 10:46:45 -0400 Subject: [PATCH 05/36] [CI] Fix CentOS 6 build by using vault.centos.org Thanks to https://techglimpse.com/failed-metadata-repo-appstream-centos-8/ --- tests/docker-compose.yml | 1 + tests/dockerfiles/centos6/Dockerfile | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 2e27ed732..0cd46bf1a 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -4,6 +4,7 @@ services: centos6: build: ./dockerfiles/centos6 cap_add: [ALL] + init: true centos7: build: ./dockerfiles/centos7 cap_add: [ALL] diff --git a/tests/dockerfiles/centos6/Dockerfile b/tests/dockerfiles/centos6/Dockerfile index e067bbd92..176f89b1d 100644 --- a/tests/dockerfiles/centos6/Dockerfile +++ b/tests/dockerfiles/centos6/Dockerfile @@ -1,12 +1,15 @@ -FROM centos:6 +FROM quay.io/centos/centos:centos6 -RUN yum update -y && \ - yum install -y \ - initscripts \ - sudo \ - && yum clean all +RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ + -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \ + /etc/yum.repos.d/CentOS-* \ + && yum update -y \ + && yum install -y \ + sudo \ + which \ + && yum clean all -RUN useradd -ms /bin/bash user \ - && echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/sbin/init"] +CMD ["/bin/sleep", "20m"] From 9f421586dee0ba0557739a03db80f332c5dcb29e Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 16 Mar 2022 11:18:45 -0400 Subject: [PATCH 06/36] [CI] Add testing and support for Debian 11 and Ubuntu 21.10 & 22.04 --- CHANGELOG.md | 2 ++ README.md | 4 ++-- tests/docker-compose.yml | 9 +++++++++ tests/dockerfiles/debian11/Dockerfile | 17 +++++++++++++++++ tests/dockerfiles/ubuntu21/Dockerfile | 16 ++++++++++++++++ tests/dockerfiles/ubuntu22/Dockerfile | 16 ++++++++++++++++ tests/inventory | 3 +++ 7 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 tests/dockerfiles/debian11/Dockerfile create mode 100644 tests/dockerfiles/ubuntu21/Dockerfile create mode 100644 tests/dockerfiles/ubuntu22/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fac1ae51..bd744ac93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ #### Changes +* Extend test matrix with: (#xxx) + * Debian 11, Ubuntu 21.10 & 22.04 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 44c98aa8b..8e396f1c5 100644 --- a/README.md +++ b/README.md @@ -170,8 +170,8 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 -- Debian 8, 9 and 10 -- Ubuntu 14.04, 16.04, 18.04 and 20.04 +- Debian 8, 9, 10 and 11 +- Ubuntu 14.04, 16.04, 18.04, 20.04, 21.10 and 22.04 ## Ansible galaxy diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 0cd46bf1a..ff5113db8 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -21,6 +21,9 @@ services: debian10: build: ./dockerfiles/debian10 cap_add: [ALL] + debian11: + build: ./dockerfiles/debian11 + cap_add: [ALL] ubuntu14: build: ./dockerfiles/ubuntu14 @@ -34,3 +37,9 @@ services: ubuntu20: build: ./dockerfiles/ubuntu20 cap_add: [ALL] + ubuntu21: + build: ./dockerfiles/ubuntu21 + cap_add: [ALL] + ubuntu22: + build: ./dockerfiles/ubuntu22 + cap_add: [ALL] diff --git a/tests/dockerfiles/debian11/Dockerfile b/tests/dockerfiles/debian11/Dockerfile new file mode 100644 index 000000000..8190edb3d --- /dev/null +++ b/tests/dockerfiles/debian11/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:11 + +RUN apt-get update \ + && apt-get install -y \ + curl \ + gpg \ + procps \ + python \ + sudo \ + systemd \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +CMD ["/lib/systemd/systemd"] diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile new file mode 100644 index 000000000..bbfd2dc9b --- /dev/null +++ b/tests/dockerfiles/ubuntu21/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:21.10 + +RUN apt-get update \ + && apt-get install -y \ + curl \ + gpg \ + python \ + sudo \ + systemd \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +CMD ["/lib/systemd/systemd"] diff --git a/tests/dockerfiles/ubuntu22/Dockerfile b/tests/dockerfiles/ubuntu22/Dockerfile new file mode 100644 index 000000000..45f9b85aa --- /dev/null +++ b/tests/dockerfiles/ubuntu22/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:22.04 + +RUN apt-get update \ + && apt-get install -y \ + curl \ + gpg \ + python \ + sudo \ + systemd \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +CMD ["/lib/systemd/systemd"] diff --git a/tests/inventory b/tests/inventory index 8467d29c9..bd506e81a 100644 --- a/tests/inventory +++ b/tests/inventory @@ -7,9 +7,12 @@ tests_centos8_1 ansible_connection=docker tests_debian8_1 ansible_connection=docker tests_debian9_1 ansible_connection=docker tests_debian10_1 ansible_connection=docker +tests_debian11_1 ansible_connection=docker [ubuntu] tests_ubuntu14_1 ansible_connection=docker tests_ubuntu16_1 ansible_connection=docker tests_ubuntu18_1 ansible_connection=docker tests_ubuntu20_1 ansible_connection=docker +tests_ubuntu21_1 ansible_connection=docker +tests_ubuntu22_1 ansible_connection=docker From d802707a70c15aa6e51d50d0a9b0af8989ecd897 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 16 Mar 2022 11:49:34 -0400 Subject: [PATCH 07/36] [CI] Fixes for launching Ubuntu 21 & 22 --- tests/dockerfiles/ubuntu21/Dockerfile | 5 +++-- tests/dockerfiles/ubuntu22/Dockerfile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile index bbfd2dc9b..9ac9ea2dc 100644 --- a/tests/dockerfiles/ubuntu21/Dockerfile +++ b/tests/dockerfiles/ubuntu21/Dockerfile @@ -1,7 +1,8 @@ FROM ubuntu:21.10 RUN apt-get update \ - && apt-get install -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install \ + -y --no-install-recommends \ curl \ gpg \ python \ @@ -13,4 +14,4 @@ RUN apt-get update \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/lib/systemd/systemd"] +CMD ["/usr/bin/sleep", "infinity"] diff --git a/tests/dockerfiles/ubuntu22/Dockerfile b/tests/dockerfiles/ubuntu22/Dockerfile index 45f9b85aa..a6d486057 100644 --- a/tests/dockerfiles/ubuntu22/Dockerfile +++ b/tests/dockerfiles/ubuntu22/Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update \ && apt-get install -y \ curl \ gpg \ - python \ + python3 \ sudo \ systemd \ && apt-get clean \ @@ -13,4 +13,4 @@ RUN apt-get update \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/lib/systemd/systemd"] +CMD ["/usr/bin/sleep", "infinity"] From 077276f279102c17e513beabc78687b23f6e9ad5 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 16 Mar 2022 11:55:28 -0400 Subject: [PATCH 08/36] [CI] Add CentOS Stream 8 --- CHANGELOG.md | 2 +- README.md | 1 + tests/docker-compose.yml | 2 ++ tests/dockerfiles/centos_stream8/Dockerfile | 12 ++++++++++++ tests/inventory | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 tests/dockerfiles/centos_stream8/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index bd744ac93..59c2c675d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ #### Changes * Extend test matrix with: (#xxx) - * Debian 11, Ubuntu 21.10 & 22.04 + * CentOS Stream 8, Debian 11, Ubuntu 21.10 & 22.04 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 8e396f1c5..5599a3a47 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,7 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 +- CentOS Stream 8 - Debian 8, 9, 10 and 11 - Ubuntu 14.04, 16.04, 18.04, 20.04, 21.10 and 22.04 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index ff5113db8..ff005a6df 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -10,6 +10,8 @@ services: cap_add: [ALL] centos8: build: ./dockerfiles/centos8 + centos_stream8: + build: ./dockerfiles/centos_stream8 cap_add: [ALL] debian8: diff --git a/tests/dockerfiles/centos_stream8/Dockerfile b/tests/dockerfiles/centos_stream8/Dockerfile new file mode 100644 index 000000000..c0e43afa2 --- /dev/null +++ b/tests/dockerfiles/centos_stream8/Dockerfile @@ -0,0 +1,12 @@ +FROM quay.io/centos/centos:stream8 + +RUN dnf update -y \ + && dnf install -y \ + sudo \ + which \ + && dnf clean all + +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +CMD ["/usr/sbin/init"] diff --git a/tests/inventory b/tests/inventory index bd506e81a..b07eeeb9a 100644 --- a/tests/inventory +++ b/tests/inventory @@ -2,6 +2,7 @@ tests_centos6_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker tests_centos8_1 ansible_connection=docker +tests_centos_stream8_1 ansible_connection=docker [debian] tests_debian8_1 ansible_connection=docker From ae249e0c235861d892ac317495d9f1fd43930bc5 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 16 Mar 2022 12:46:38 -0400 Subject: [PATCH 09/36] [CI] Fix CentOS 8 build by using vault.centos.org Thanks to https://techglimpse.com/failed-metadata-repo-appstream-centos-8/ --- tests/dockerfiles/centos8/Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/dockerfiles/centos8/Dockerfile b/tests/dockerfiles/centos8/Dockerfile index 1ad2d8681..1e59d13da 100644 --- a/tests/dockerfiles/centos8/Dockerfile +++ b/tests/dockerfiles/centos8/Dockerfile @@ -1,10 +1,13 @@ -FROM centos:8 +FROM quay.io/centos/centos:centos8 -RUN yum update -y \ - && yum install -y \ +RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ + -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \ + /etc/yum.repos.d/CentOS-* \ + && dnf update -y \ + && dnf install -y \ sudo \ which \ - && yum clean all + && dnf clean all RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers From afd13c840d5a93f2f2e1944d0075dc6d682317a7 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Fri, 18 Mar 2022 07:37:03 -0400 Subject: [PATCH 10/36] [CI] Explicitly shut down containers --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ea81cef02..84e5f2a82 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,3 +31,5 @@ jobs: run: docker-compose up -d - name: Run Ansible on all containers run: ansible-playbook $playbook + - name: Shut down containers + run: docker-compose down From 577a09f736e95c95590495f34784fe24718ece06 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sun, 20 Mar 2022 19:14:24 -0400 Subject: [PATCH 11/36] [CI] Start with a 2 minute timeout for CentOS 6 --- tests/dockerfiles/centos6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dockerfiles/centos6/Dockerfile b/tests/dockerfiles/centos6/Dockerfile index 176f89b1d..3efa83221 100644 --- a/tests/dockerfiles/centos6/Dockerfile +++ b/tests/dockerfiles/centos6/Dockerfile @@ -12,4 +12,4 @@ RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/bin/sleep", "20m"] +CMD ["/bin/sleep", "2m"] From 599ddd1d53bbd5baaded71a1218ea6d1479ee2a5 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Mon, 21 Mar 2022 19:50:54 -0400 Subject: [PATCH 12/36] [CI] Fix reference to matrix context --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 84e5f2a82..485c100d4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,6 @@ jobs: - name: Launch containers run: docker-compose up -d - name: Run Ansible on all containers - run: ansible-playbook $playbook + run: ansible-playbook ${{ matrix.playbook }} - name: Shut down containers run: docker-compose down From 8019d2d33029715da16db765d879622c8400e6cb Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 14:23:41 -0400 Subject: [PATCH 13/36] [CI] Add Docker Image Caching --- .github/workflows/tests.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 485c100d4..56e2c4420 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,14 +22,37 @@ jobs: working-directory: tests steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v2 with: cache: 'pip' cache-dependency-path: | .github/workflows/tests.yml + + # Docker Image Caching: Step 1 + # Pull the latest image to build, and avoid caching pull-only images. + # (docker pull is faster than caching in most cases.) + - run: docker-compose pull + + # Docker Image Caching: Step 2 + # In this step, this action saves a list of existing images, + # the cache is created without them in the post run. + # It also restores the cache if it exists. + - uses: satackey/action-docker-layer-caching@v0.0.11 + # Ignore the failure of a step and avoid terminating the job. + continue-on-error: true + + # Docker Image Caching: Step 3 - name: Launch containers - run: docker-compose up -d + - run: docker-compose up --build -d + + # Run the tests - name: Run Ansible on all containers run: ansible-playbook ${{ matrix.playbook }} + - name: Shut down containers run: docker-compose down + + # Docker Image Caching: Step 4 + # Finally a post-run action of satackey/action-docker-layer-caching, + # which is the process of saving the cache, will be executed automatically From e35a1900e35dddbfc8533f673e3a8d7d4cc6df73 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 14:51:10 -0400 Subject: [PATCH 14/36] [CI] Add Docker Image Caching: Fix --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56e2c4420..a4af1473d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: # Docker Image Caching: Step 3 - name: Launch containers - - run: docker-compose up --build -d + run: docker-compose up --build -d # Run the tests - name: Run Ansible on all containers From c792a66fa3bae34329eb6beca36ff5ea2447901a Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 15:00:47 -0400 Subject: [PATCH 15/36] [CI] Rename the task that runs the test --- .github/workflows/tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a4af1473d..764e047c7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,8 +46,7 @@ jobs: - name: Launch containers run: docker-compose up --build -d - # Run the tests - - name: Run Ansible on all containers + - name: Run The Tests run: ansible-playbook ${{ matrix.playbook }} - name: Shut down containers From fcdda1bf141a6ecac07e5541086d12f3f8bd9e90 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 15:59:17 -0400 Subject: [PATCH 16/36] [CI] Set a 29 minute timeout for CentOS 6 to avoid early shutdown --- tests/dockerfiles/centos6/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dockerfiles/centos6/Dockerfile b/tests/dockerfiles/centos6/Dockerfile index 3efa83221..baa5ed4d0 100644 --- a/tests/dockerfiles/centos6/Dockerfile +++ b/tests/dockerfiles/centos6/Dockerfile @@ -12,4 +12,4 @@ RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/bin/sleep", "2m"] +CMD ["/bin/sleep", "29m"] From dbcf88a8a4a39540ee16c198733bfe019f8dae49 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 16:20:23 -0400 Subject: [PATCH 17/36] [CI] Centos Stream 8: Ensure ps is installed to avoid 'command not found' TASK [rvm1-ansible : Configure rvm] [...] "stderr": "/opt/rvm/scripts/rvm: line 25: ps: command not found\nRVM not loaded, aborting." --- tests/dockerfiles/centos_stream8/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dockerfiles/centos_stream8/Dockerfile b/tests/dockerfiles/centos_stream8/Dockerfile index c0e43afa2..f0c089a0c 100644 --- a/tests/dockerfiles/centos_stream8/Dockerfile +++ b/tests/dockerfiles/centos_stream8/Dockerfile @@ -2,6 +2,7 @@ FROM quay.io/centos/centos:stream8 RUN dnf update -y \ && dnf install -y \ + procps \ sudo \ which \ && dnf clean all From 297d97f3dc8435d5b783c6803b2dac533e1bdb3a Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 16:37:35 -0400 Subject: [PATCH 18/36] [CI] Ubuntu 21: Install dirmngr to avoid gpg error TASK [rvm1-ansible : Import GPG keys from keyservers] gpg: directory '/root/.gnupg' created gpg: keybox '/root/.gnupg/pubring.kbx' created gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory gpg: connecting dirmngr at '/root/.gnupg/S.dirmngr' failed: No such file or directory gpg: keyserver receive failed: No dirmngr --- tests/dockerfiles/ubuntu21/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile index 9ac9ea2dc..a4afc73f8 100644 --- a/tests/dockerfiles/ubuntu21/Dockerfile +++ b/tests/dockerfiles/ubuntu21/Dockerfile @@ -4,6 +4,7 @@ RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install \ -y --no-install-recommends \ curl \ + dirmngr \ gpg \ python \ sudo \ From 10b145c224114f63391908bc7cb23bf6ace4c960 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 16:42:08 -0400 Subject: [PATCH 19/36] [CI] Ubuntu 21: Install ca-certificates to avoid TLS error TASK [rvm1-ansible : Install rvm installer] [...] "msg": "Request failed: ", "url": "https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer"} --- tests/dockerfiles/ubuntu21/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile index a4afc73f8..5d44ea70a 100644 --- a/tests/dockerfiles/ubuntu21/Dockerfile +++ b/tests/dockerfiles/ubuntu21/Dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:21.10 RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install \ -y --no-install-recommends \ + ca-certificates \ curl \ dirmngr \ gpg \ From 2c248da9a667e7fd102b89df5e97085cc2a33f50 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Tue, 22 Mar 2022 18:07:07 -0400 Subject: [PATCH 20/36] [CI] Drop testing for beta Ubuntu 22.04 It's not out yet. Give rvm/rvm project some to deal with the following issue: Ubuntu 22.04 installs OpenSSL 3 instead of 1.1. RVM will need to take steps to continue to compile Ruby against libssl-dev 1.1 instead of 3. --- CHANGELOG.md | 2 +- README.md | 2 +- tests/docker-compose.yml | 3 --- tests/dockerfiles/ubuntu22/Dockerfile | 16 ---------------- tests/inventory | 1 - 5 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 tests/dockerfiles/ubuntu22/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 59c2c675d..64e2ee33b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ #### Changes * Extend test matrix with: (#xxx) - * CentOS Stream 8, Debian 11, Ubuntu 21.10 & 22.04 + * CentOS Stream 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 5599a3a47..3f05c5176 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ The continuous integration setup of this project currently covers following plat - CentOS 6, 7 and 8 - CentOS Stream 8 - Debian 8, 9, 10 and 11 -- Ubuntu 14.04, 16.04, 18.04, 20.04, 21.10 and 22.04 +- Ubuntu 14.04, 16.04, 18.04, 20.04 and 21.10 ## Ansible galaxy diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index ff005a6df..1cc760ad0 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -42,6 +42,3 @@ services: ubuntu21: build: ./dockerfiles/ubuntu21 cap_add: [ALL] - ubuntu22: - build: ./dockerfiles/ubuntu22 - cap_add: [ALL] diff --git a/tests/dockerfiles/ubuntu22/Dockerfile b/tests/dockerfiles/ubuntu22/Dockerfile deleted file mode 100644 index a6d486057..000000000 --- a/tests/dockerfiles/ubuntu22/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM ubuntu:22.04 - -RUN apt-get update \ - && apt-get install -y \ - curl \ - gpg \ - python3 \ - sudo \ - systemd \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash user && \ - echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers - -CMD ["/usr/bin/sleep", "infinity"] diff --git a/tests/inventory b/tests/inventory index b07eeeb9a..4be0bd25a 100644 --- a/tests/inventory +++ b/tests/inventory @@ -16,4 +16,3 @@ tests_ubuntu16_1 ansible_connection=docker tests_ubuntu18_1 ansible_connection=docker tests_ubuntu20_1 ansible_connection=docker tests_ubuntu21_1 ansible_connection=docker -tests_ubuntu22_1 ansible_connection=docker From 3d37e8794513b88b7ce31c12269bc2ed0b8b4f02 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 23 Mar 2022 08:00:04 -0400 Subject: [PATCH 21/36] [CI] Remove unneeded setup-python GitHub Action GitHub Runners come with Ansible already --- .github/workflows/tests.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 764e047c7..6534e39fb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,12 +23,6 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 - with: - cache: 'pip' - cache-dependency-path: | - .github/workflows/tests.yml - # Docker Image Caching: Step 1 # Pull the latest image to build, and avoid caching pull-only images. # (docker pull is faster than caching in most cases.) From f6bdfa8f5f8dc79fcd9ca4ceb65968d79796f436 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 23 Mar 2022 22:27:35 -0400 Subject: [PATCH 22/36] [CI] Test against Centos Stream 9 --- CHANGELOG.md | 2 +- README.md | 2 +- tests/docker-compose.yml | 4 ++++ tests/dockerfiles/centos_stream9/Dockerfile | 13 +++++++++++++ tests/inventory | 1 + 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tests/dockerfiles/centos_stream9/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e2ee33b..342ccd68b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ #### Changes * Extend test matrix with: (#xxx) - * CentOS Stream 8, Debian 11, Ubuntu 21.10 + * CentOS Stream 8 & 9, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 3f05c5176..d7c9c6255 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 -- CentOS Stream 8 +- CentOS Stream 8 and 9 - Debian 8, 9, 10 and 11 - Ubuntu 14.04, 16.04, 18.04, 20.04 and 21.10 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 1cc760ad0..bf4360180 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -13,6 +13,10 @@ services: centos_stream8: build: ./dockerfiles/centos_stream8 cap_add: [ALL] + centos_stream9: + build: ./dockerfiles/centos_stream9 + cap_add: [ALL] + init: true debian8: build: ./dockerfiles/debian8 diff --git a/tests/dockerfiles/centos_stream9/Dockerfile b/tests/dockerfiles/centos_stream9/Dockerfile new file mode 100644 index 000000000..dcf7c3b15 --- /dev/null +++ b/tests/dockerfiles/centos_stream9/Dockerfile @@ -0,0 +1,13 @@ +FROM quay.io/centos/centos:stream9 + +RUN dnf update -y \ + && dnf install -y \ + procps \ + sudo \ + which \ + && dnf clean all + +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +CMD ["/bin/sleep", "29m"] diff --git a/tests/inventory b/tests/inventory index 4be0bd25a..19d1a6e35 100644 --- a/tests/inventory +++ b/tests/inventory @@ -3,6 +3,7 @@ tests_centos6_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker tests_centos8_1 ansible_connection=docker tests_centos_stream8_1 ansible_connection=docker +tests_centos_stream9_1 ansible_connection=docker [debian] tests_debian8_1 ansible_connection=docker From 23a9d8cc25060573fac1033b2226e8bed68cf121 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Wed, 23 Mar 2022 22:28:03 -0400 Subject: [PATCH 23/36] [CI] Restore "Parallelize the test matrix" behavior from #215 --- .github/workflows/tests.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6534e39fb..3d39a61ef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,7 @@ on: pull_request: schedule: - cron: '46 3 20 * *' + jobs: tests: strategy: @@ -16,10 +17,17 @@ jobs: playbook: - user.yml - root.yml + platform: + - centos + - debian + - ubuntu + runs-on: ubuntu-latest + defaults: run: working-directory: tests + steps: - uses: actions/checkout@v3 @@ -38,10 +46,10 @@ jobs: # Docker Image Caching: Step 3 - name: Launch containers - run: docker-compose up --build -d + run: ls -1 ./dockerfiles/ | fgrep ${{ matrix.platform }} | xargs docker-compose up --build -d - name: Run The Tests - run: ansible-playbook ${{ matrix.playbook }} + run: ansible-playbook ${{ matrix.playbook }} -l ${{ matrix.platform }} - name: Shut down containers run: docker-compose down From 0837d740ce1c4f7bf3d0ed06b514cf5c3ccaf36e Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 15:22:09 -0400 Subject: [PATCH 24/36] Revert "[CI] Test against Centos Stream 9" This reverts commit f6bdfa8f5f8dc79fcd9ca4ceb65968d79796f436. --- CHANGELOG.md | 2 +- README.md | 2 +- tests/docker-compose.yml | 4 ---- tests/dockerfiles/centos_stream9/Dockerfile | 13 ------------- tests/inventory | 1 - 5 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 tests/dockerfiles/centos_stream9/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index 342ccd68b..64e2ee33b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ #### Changes * Extend test matrix with: (#xxx) - * CentOS Stream 8 & 9, Debian 11, Ubuntu 21.10 + * CentOS Stream 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index d7c9c6255..3f05c5176 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 -- CentOS Stream 8 and 9 +- CentOS Stream 8 - Debian 8, 9, 10 and 11 - Ubuntu 14.04, 16.04, 18.04, 20.04 and 21.10 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index bf4360180..1cc760ad0 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -13,10 +13,6 @@ services: centos_stream8: build: ./dockerfiles/centos_stream8 cap_add: [ALL] - centos_stream9: - build: ./dockerfiles/centos_stream9 - cap_add: [ALL] - init: true debian8: build: ./dockerfiles/debian8 diff --git a/tests/dockerfiles/centos_stream9/Dockerfile b/tests/dockerfiles/centos_stream9/Dockerfile deleted file mode 100644 index dcf7c3b15..000000000 --- a/tests/dockerfiles/centos_stream9/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM quay.io/centos/centos:stream9 - -RUN dnf update -y \ - && dnf install -y \ - procps \ - sudo \ - which \ - && dnf clean all - -RUN useradd -ms /bin/bash user && \ - echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers - -CMD ["/bin/sleep", "29m"] diff --git a/tests/inventory b/tests/inventory index 19d1a6e35..4be0bd25a 100644 --- a/tests/inventory +++ b/tests/inventory @@ -3,7 +3,6 @@ tests_centos6_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker tests_centos8_1 ansible_connection=docker tests_centos_stream8_1 ansible_connection=docker -tests_centos_stream9_1 ansible_connection=docker [debian] tests_debian8_1 ansible_connection=docker From ef6bf232a9debd4c12649737bfa668211090938a Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 16:42:13 -0400 Subject: [PATCH 25/36] [CI] Replace CentOS Stream with Rocky Linux --- CHANGELOG.md | 2 +- README.md | 2 +- tests/docker-compose.yml | 4 ++-- .../{centos_stream8 => rockylinux8_alt_centos}/Dockerfile | 2 +- tests/inventory | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename tests/dockerfiles/{centos_stream8 => rockylinux8_alt_centos}/Dockerfile (85%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64e2ee33b..dbf50c9ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ #### Changes * Extend test matrix with: (#xxx) - * CentOS Stream 8, Debian 11, Ubuntu 21.10 + * Rocky Linux 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 3f05c5176..8e3b5a772 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 -- CentOS Stream 8 +- Rocky Linux 8 - Debian 8, 9, 10 and 11 - Ubuntu 14.04, 16.04, 18.04, 20.04 and 21.10 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 1cc760ad0..63f028483 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -10,8 +10,8 @@ services: cap_add: [ALL] centos8: build: ./dockerfiles/centos8 - centos_stream8: - build: ./dockerfiles/centos_stream8 + rockylinux8_alt_centos: + build: ./dockerfiles/rockylinux8_alt_centos cap_add: [ALL] debian8: diff --git a/tests/dockerfiles/centos_stream8/Dockerfile b/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile similarity index 85% rename from tests/dockerfiles/centos_stream8/Dockerfile rename to tests/dockerfiles/rockylinux8_alt_centos/Dockerfile index f0c089a0c..c0d1b3598 100644 --- a/tests/dockerfiles/centos_stream8/Dockerfile +++ b/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos/centos:stream8 +FROM rockylinux:8 RUN dnf update -y \ && dnf install -y \ diff --git a/tests/inventory b/tests/inventory index 4be0bd25a..7cab27d61 100644 --- a/tests/inventory +++ b/tests/inventory @@ -2,7 +2,7 @@ tests_centos6_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker tests_centos8_1 ansible_connection=docker -tests_centos_stream8_1 ansible_connection=docker +tests_rockylinux8_alt_centos_1 ansible_connection=docker [debian] tests_debian8_1 ansible_connection=docker From a05ff4fc9cf5229be801d68dec432aa3c7e48997 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 16:49:39 -0400 Subject: [PATCH 26/36] [CI] Ubuntu 21.10: Restrict time to 29 min --- tests/docker-compose.yml | 1 + tests/dockerfiles/centos6/Dockerfile | 2 +- tests/dockerfiles/ubuntu21/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 63f028483..665bcaf8a 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -42,3 +42,4 @@ services: ubuntu21: build: ./dockerfiles/ubuntu21 cap_add: [ALL] + init: true diff --git a/tests/dockerfiles/centos6/Dockerfile b/tests/dockerfiles/centos6/Dockerfile index baa5ed4d0..28558261d 100644 --- a/tests/dockerfiles/centos6/Dockerfile +++ b/tests/dockerfiles/centos6/Dockerfile @@ -12,4 +12,4 @@ RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/bin/sleep", "29m"] +CMD ["/usr/bin/env", "sleep", "29m"] diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile index 5d44ea70a..9f2d01f4e 100644 --- a/tests/dockerfiles/ubuntu21/Dockerfile +++ b/tests/dockerfiles/ubuntu21/Dockerfile @@ -16,4 +16,4 @@ RUN apt-get update \ RUN useradd -ms /bin/bash user && \ echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -CMD ["/usr/bin/sleep", "infinity"] +CMD ["/usr/bin/env", "sleep", "29m"] From eec35787a01bd601830a019041036421b2bca5a9 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 16:56:42 -0400 Subject: [PATCH 27/36] [DOC] Update CHANGELOG PR reference --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbf50c9ed..5cb94df0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ #### Changes -* Extend test matrix with: (#xxx) +* Extend test matrix with: (#234) * Rocky Linux 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 From 3e1454c2638a4166e0e87aa6ca2ebb963bf51588 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 17:32:42 -0400 Subject: [PATCH 28/36] [CI] Rocky Linux 8: Add required findutils package --- tests/dockerfiles/rockylinux8_alt_centos/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile b/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile index c0d1b3598..303741b4c 100644 --- a/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile +++ b/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile @@ -2,6 +2,7 @@ FROM rockylinux:8 RUN dnf update -y \ && dnf install -y \ + findutils \ procps \ sudo \ which \ From 07c36e319ce2dba3256bf58e2548c90553363184 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Thu, 24 Mar 2022 17:57:27 -0400 Subject: [PATCH 29/36] DOC] Update CHANGELOG PR reference --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cb94df0c..570fac145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ #### Changes -* Extend test matrix with: (#234) +* Extend test matrix with: (#235) * Rocky Linux 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 From 5352666a63a60f26b912ada396b27067c3beade6 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 14:46:20 -0400 Subject: [PATCH 30/36] [CI] [DOC] Add a comment around scheduled workflow --- .github/workflows/tests.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3d39a61ef..2556e5529 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,11 @@ on: - main - master pull_request: + + # Run monthly as a canary for issues such as package installation failure. + # Note: scheduled workflows are disabled automatically after 60 days of + # repository inactivity. + # https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow schedule: - cron: '46 3 20 * *' From afc62bbbff1f86b9f2b8e06fba7c8d14649bdc6f Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 14:49:37 -0400 Subject: [PATCH 31/36] [CI] Run CI on any branch push --- .github/workflows/tests.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2556e5529..2b0037280 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,7 @@ name: CI on: push: - branches: - - develop - - main - - master pull_request: - # Run monthly as a canary for issues such as package installation failure. # Note: scheduled workflows are disabled automatically after 60 days of # repository inactivity. From c20b4654a91c97fa4817932020d0eb80ba71c842 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 14:51:17 -0400 Subject: [PATCH 32/36] [DOC] Align YAML comments with Steps --- .github/workflows/tests.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b0037280..67fbaed9d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,20 +31,20 @@ jobs: steps: - uses: actions/checkout@v3 - # Docker Image Caching: Step 1 - # Pull the latest image to build, and avoid caching pull-only images. - # (docker pull is faster than caching in most cases.) + # Docker Image Caching: Step 1 + # Pull the latest image to build, and avoid caching pull-only images. + # (docker pull is faster than caching in most cases.) - run: docker-compose pull - # Docker Image Caching: Step 2 - # In this step, this action saves a list of existing images, - # the cache is created without them in the post run. - # It also restores the cache if it exists. + # Docker Image Caching: Step 2 + # In this step, this action saves a list of existing images, + # the cache is created without them in the post run. + # It also restores the cache if it exists. - uses: satackey/action-docker-layer-caching@v0.0.11 # Ignore the failure of a step and avoid terminating the job. continue-on-error: true - # Docker Image Caching: Step 3 + # Docker Image Caching: Step 3 - name: Launch containers run: ls -1 ./dockerfiles/ | fgrep ${{ matrix.platform }} | xargs docker-compose up --build -d @@ -54,6 +54,6 @@ jobs: - name: Shut down containers run: docker-compose down - # Docker Image Caching: Step 4 - # Finally a post-run action of satackey/action-docker-layer-caching, - # which is the process of saving the cache, will be executed automatically + # Docker Image Caching: Step 4 + # Finally a post-run action of satackey/action-docker-layer-caching, + # which is the process of saving the cache, will be executed automatically. From bbc946f662eea2c48a2f858327b6f37fc9011755 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 14:53:35 -0400 Subject: [PATCH 33/36] [DOC] Update CHANGELOG entry to include principal change: Migrate GitHub Actions --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5b52dd50..d0083c102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ #### Changes -* Extend test matrix with: (#235) +* Migrate CI to GitHub Actions and extend test matrix with: (#235) * Rocky Linux 8, Debian 11, Ubuntu 21.10 * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 From 51d3f5f3423e86b9811ca4c917dd0d6d39886699 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 15:24:09 -0400 Subject: [PATCH 34/36] [CI] Use CentOS from Docker Hub --- tests/dockerfiles/centos6/Dockerfile | 2 +- tests/dockerfiles/centos8/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dockerfiles/centos6/Dockerfile b/tests/dockerfiles/centos6/Dockerfile index 28558261d..b74b24cec 100644 --- a/tests/dockerfiles/centos6/Dockerfile +++ b/tests/dockerfiles/centos6/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos/centos:centos6 +FROM centos:6 RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \ diff --git a/tests/dockerfiles/centos8/Dockerfile b/tests/dockerfiles/centos8/Dockerfile index 1e59d13da..bdc7ec576 100644 --- a/tests/dockerfiles/centos8/Dockerfile +++ b/tests/dockerfiles/centos8/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos/centos:centos8 +FROM centos:8 RUN sed -i -e 's/mirrorlist/#mirrorlist/g' \ -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' \ From 6b37dbae132ffe15464dc7ead611bad23d9c9a75 Mon Sep 17 00:00:00 2001 From: Stephen George Date: Sat, 26 Mar 2022 15:33:28 -0400 Subject: [PATCH 35/36] [CI] Make this PR purely about CI switch (no added OSs) --- CHANGELOG.md | 3 +-- README.md | 5 ++--- tests/docker-compose.yml | 9 --------- tests/dockerfiles/debian11/Dockerfile | 17 ----------------- .../rockylinux8_alt_centos/Dockerfile | 14 -------------- tests/dockerfiles/ubuntu21/Dockerfile | 19 ------------------- tests/inventory | 3 --- 7 files changed, 3 insertions(+), 67 deletions(-) delete mode 100644 tests/dockerfiles/debian11/Dockerfile delete mode 100644 tests/dockerfiles/rockylinux8_alt_centos/Dockerfile delete mode 100644 tests/dockerfiles/ubuntu21/Dockerfile diff --git a/CHANGELOG.md b/CHANGELOG.md index d0083c102..64ba810c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,7 @@ #### Changes -* Migrate CI to GitHub Actions and extend test matrix with: (#235) - * Rocky Linux 8, Debian 11, Ubuntu 21.10 +* Migrate CI to GitHub Actions: (#235) * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1 diff --git a/README.md b/README.md index 953359bb7..25ec5a36b 100644 --- a/README.md +++ b/README.md @@ -172,9 +172,8 @@ Compatibility with Linux distributions based on Debian, Ubuntu or Redhat familie The continuous integration setup of this project currently covers following platforms: - CentOS 6, 7 and 8 -- Rocky Linux 8 -- Debian 8, 9, 10 and 11 -- Ubuntu 14.04, 16.04, 18.04, 20.04 and 21.10 +- Debian 8, 9 and 10 +- Ubuntu 14.04, 16.04, 18.04 and 20.04 ## Ansible galaxy diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 665bcaf8a..0cd46bf1a 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -10,8 +10,6 @@ services: cap_add: [ALL] centos8: build: ./dockerfiles/centos8 - rockylinux8_alt_centos: - build: ./dockerfiles/rockylinux8_alt_centos cap_add: [ALL] debian8: @@ -23,9 +21,6 @@ services: debian10: build: ./dockerfiles/debian10 cap_add: [ALL] - debian11: - build: ./dockerfiles/debian11 - cap_add: [ALL] ubuntu14: build: ./dockerfiles/ubuntu14 @@ -39,7 +34,3 @@ services: ubuntu20: build: ./dockerfiles/ubuntu20 cap_add: [ALL] - ubuntu21: - build: ./dockerfiles/ubuntu21 - cap_add: [ALL] - init: true diff --git a/tests/dockerfiles/debian11/Dockerfile b/tests/dockerfiles/debian11/Dockerfile deleted file mode 100644 index 8190edb3d..000000000 --- a/tests/dockerfiles/debian11/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM debian:11 - -RUN apt-get update \ - && apt-get install -y \ - curl \ - gpg \ - procps \ - python \ - sudo \ - systemd \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash user && \ - echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers - -CMD ["/lib/systemd/systemd"] diff --git a/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile b/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile deleted file mode 100644 index 303741b4c..000000000 --- a/tests/dockerfiles/rockylinux8_alt_centos/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM rockylinux:8 - -RUN dnf update -y \ - && dnf install -y \ - findutils \ - procps \ - sudo \ - which \ - && dnf clean all - -RUN useradd -ms /bin/bash user && \ - echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers - -CMD ["/usr/sbin/init"] diff --git a/tests/dockerfiles/ubuntu21/Dockerfile b/tests/dockerfiles/ubuntu21/Dockerfile deleted file mode 100644 index 9f2d01f4e..000000000 --- a/tests/dockerfiles/ubuntu21/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM ubuntu:21.10 - -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install \ - -y --no-install-recommends \ - ca-certificates \ - curl \ - dirmngr \ - gpg \ - python \ - sudo \ - systemd \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN useradd -ms /bin/bash user && \ - echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers - -CMD ["/usr/bin/env", "sleep", "29m"] diff --git a/tests/inventory b/tests/inventory index 7cab27d61..8467d29c9 100644 --- a/tests/inventory +++ b/tests/inventory @@ -2,17 +2,14 @@ tests_centos6_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker tests_centos8_1 ansible_connection=docker -tests_rockylinux8_alt_centos_1 ansible_connection=docker [debian] tests_debian8_1 ansible_connection=docker tests_debian9_1 ansible_connection=docker tests_debian10_1 ansible_connection=docker -tests_debian11_1 ansible_connection=docker [ubuntu] tests_ubuntu14_1 ansible_connection=docker tests_ubuntu16_1 ansible_connection=docker tests_ubuntu18_1 ansible_connection=docker tests_ubuntu20_1 ansible_connection=docker -tests_ubuntu21_1 ansible_connection=docker From 5313d0d2b57272f34df8c21509091fc879ff54ea Mon Sep 17 00:00:00 2001 From: Piotr Kuczynski Date: Sat, 26 Mar 2022 22:33:04 +0100 Subject: [PATCH 36/36] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ba810c4..bdc3422ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ #### Changes -* Migrate CI to GitHub Actions: (#235) +* Migrate CI to GitHub Actions (#235) * Extend test matrix with: (#215) * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 * Ruby 2.6.6 and 2.7.1