From 02e75fd112f13c2d558f40a5f8cb4c1aeaac3197 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Thu, 23 Jul 2020 12:19:04 +0200 Subject: [PATCH 1/9] Update and enhance the test environment - Add more recent version of CentOS, Ubuntu and Debian - Integrate tests/root.yml in Travis CI build (not only user.yml) - Use latest versions of Ruby, Ansible and docker-compose in Travis CI build environment. This change fixes failing tests due to Bundler recent versions being incompatible with Ruby 2.2 and 2.3. - Minor changes in the tests playbooks (name plays and add tags) --- .travis.yml | 4 +-- tests/assertions.yml | 8 ++--- tests/docker-compose.yml | 45 ++++++++++++++++----------- tests/dockerfiles/centos8/Dockerfile | 12 +++++++ tests/dockerfiles/debian10/Dockerfile | 17 ++++++++++ tests/dockerfiles/ubuntu18/Dockerfile | 16 ++++++++++ tests/dockerfiles/ubuntu20/Dockerfile | 16 ++++++++++ tests/inventory | 12 +++++-- tests/root.yml | 16 +++++----- tests/user.yml | 14 ++++----- 10 files changed, 118 insertions(+), 42 deletions(-) create mode 100644 tests/dockerfiles/centos8/Dockerfile create mode 100644 tests/dockerfiles/debian10/Dockerfile create mode 100644 tests/dockerfiles/ubuntu18/Dockerfile create mode 100644 tests/dockerfiles/ubuntu20/Dockerfile diff --git a/.travis.yml b/.travis.yml index da42d779e..4cf68978e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: generic sudo: required env: - DOCKER_COMPOSE_VERSION: 1.16.1 + DOCKER_COMPOSE_VERSION: 1.26.2 services: - docker @@ -22,7 +22,7 @@ before_install: - sudo mv docker-compose /usr/local/bin install: - - sudo pip install ansible==2.4.6.0 > /dev/null 2>&1 + - sudo pip install ansible==2.9.9 > /dev/null 2>&1 script: - cd tests diff --git a/tests/assertions.yml b/tests/assertions.yml index 8a21c7796..1e701309e 100644 --- a/tests/assertions.yml +++ b/tests/assertions.yml @@ -17,7 +17,7 @@ changed_when: false - assert: that: - - check_ruby_default.stdout == 'ruby 2.3.1' + - check_ruby_default.stdout == 'ruby 2.7.1' msg: No default ruby installed - name: Check multiple rubies @@ -26,12 +26,12 @@ changed_when: false - assert: that: - - "'ruby-2.2.5' in check_ruby_multiple.stdout" - - "'ruby-2.3.1' in check_ruby_multiple.stdout" + - "'ruby-2.6.6' in check_ruby_multiple.stdout" + - "'ruby-2.7.1' in check_ruby_multiple.stdout" msg: No multiple rubies installed - name: Check bundler symlinked on system path - shell: ls ~/.rvm/wrappers/default/ |grep 'bundler' + shell: ls ~/.rvm/wrappers/default/ | grep 'bundler' register: check_ruby_bundler changed_when: false - assert: diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 3f71c4f13..fc0858f67 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,26 +1,35 @@ version: "3" services: - centos6: - build: ./dockerfiles/centos6 - cap_add: - - ALL + + centos8: + build: ./dockerfiles/centos8 + cap_add: [ALL] centos7: build: ./dockerfiles/centos7 - cap_add: - - ALL - debian8: - build: ./dockerfiles/debian8 - cap_add: - - ALL + cap_add: [ALL] + centos6: + build: ./dockerfiles/centos6 + cap_add: [ALL] + + debian10: + build: ./dockerfiles/debian10 + cap_add: [ALL] debian9: build: ./dockerfiles/debian9 - cap_add: - - ALL - ubuntu14: - build: ./dockerfiles/ubuntu14 - cap_add: - - ALL + cap_add: [ALL] + debian8: + build: ./dockerfiles/debian8 + cap_add: [ALL] + + ubuntu20: + build: ./dockerfiles/ubuntu20 + cap_add: [ALL] + ubuntu18: + build: ./dockerfiles/ubuntu18 + cap_add: [ALL] ubuntu16: build: ./dockerfiles/ubuntu16 - cap_add: - - ALL + cap_add: [ALL] + ubuntu14: + build: ./dockerfiles/ubuntu14 + cap_add: [ALL] diff --git a/tests/dockerfiles/centos8/Dockerfile b/tests/dockerfiles/centos8/Dockerfile new file mode 100644 index 000000000..1ad2d8681 --- /dev/null +++ b/tests/dockerfiles/centos8/Dockerfile @@ -0,0 +1,12 @@ +FROM centos:8 + +RUN 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 + +CMD ["/usr/sbin/init"] diff --git a/tests/dockerfiles/debian10/Dockerfile b/tests/dockerfiles/debian10/Dockerfile new file mode 100644 index 000000000..a89ca4040 --- /dev/null +++ b/tests/dockerfiles/debian10/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:10 + +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/ubuntu18/Dockerfile b/tests/dockerfiles/ubuntu18/Dockerfile new file mode 100644 index 000000000..7a94eb2f3 --- /dev/null +++ b/tests/dockerfiles/ubuntu18/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:18.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/dockerfiles/ubuntu20/Dockerfile b/tests/dockerfiles/ubuntu20/Dockerfile new file mode 100644 index 000000000..318a3d530 --- /dev/null +++ b/tests/dockerfiles/ubuntu20/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:20.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 02faca241..a8a6d2cc4 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,9 +1,15 @@ [centos] -tests_centos6_1 ansible_connection=docker +tests_centos8_1 ansible_connection=docker tests_centos7_1 ansible_connection=docker +tests_centos6_1 ansible_connection=docker + [debian] -tests_debian8_1 ansible_connection=docker +tests_debian10_1 ansible_connection=docker tests_debian9_1 ansible_connection=docker +tests_debian8_1 ansible_connection=docker + [ubuntu] -tests_ubuntu14_1 ansible_connection=docker +tests_ubuntu20_1 ansible_connection=docker +tests_ubuntu18_1 ansible_connection=docker tests_ubuntu16_1 ansible_connection=docker +tests_ubuntu14_1 ansible_connection=docker diff --git a/tests/root.yml b/tests/root.yml index 96db50653..50484f2fc 100644 --- a/tests/root.yml +++ b/tests/root.yml @@ -1,19 +1,19 @@ --- -- hosts: all +- name: RVM System Wide Setup + hosts: all gather_facts: false vars: rvm1_user: root rvm1_install_flags: '--auto-dotfiles' rvm1_install_path: '/home/{{ rvm1_user }}/.rvm' rvm1_rubies: - - 'ruby-2.2.5' - - 'ruby-2.3.1' + - 'ruby-2.6.6' + - 'ruby-2.7.1' roles: - - role: rvm1-ansible + - rvm1-ansible -# Asserts tasks -- hosts: all +- name: RVM Setup Validation + hosts: all gather_facts: false tasks: - - name: Assert tasks - import_tasks: assertions.yml + - import_tasks: assertions.yml diff --git a/tests/user.yml b/tests/user.yml index ac0005fd3..05bf740a2 100644 --- a/tests/user.yml +++ b/tests/user.yml @@ -1,21 +1,21 @@ --- -- hosts: all +- name: RVM Single User Setup + hosts: all gather_facts: false remote_user: user vars: rvm1_user: user rvm1_install_path: '/home/{{ rvm1_user }}/.rvm' rvm1_rubies: - - 'ruby-2.2.5' - - 'ruby-2.3.1' + - 'ruby-2.6.6' + - 'ruby-2.7.1' roles: - role: rvm1-ansible become: yes -# Asserts tasks -- hosts: all +- name: RVM Setup Validation + hosts: all gather_facts: false remote_user: user tasks: - - name: Assert tasks - import_tasks: assertions.yml + - import_tasks: assertions.yml From 5c0f0f0c3d55990360c699c9e466da59aad2e7ff Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Thu, 23 Jul 2020 12:25:14 +0200 Subject: [PATCH 2/9] Add system-wide tests to CI and modify assertions The new assertion logic aims to validate rvm behaviours in a more abstract fashion, instead of directly hitting some installed files (which locations depends on RVM internals, i.e. current implementation). --- .travis.yml | 5 +++++ tests/assertions.yml | 47 ++++++++++++++++++++++++++++++-------------- tests/root.yml | 6 +++++- tests/user.yml | 4 ++++ 4 files changed, 46 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cf68978e..77dd293d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,11 @@ script: - ansible-playbook user.yml -l centos - ansible-playbook user.yml -l debian - ansible-playbook user.yml -l ubuntu + - docker-compose down + - docker-compose up -d + - ansible-playbook root.yml -l centos + - ansible-playbook root.yml -l debian + - ansible-playbook root.yml -l ubuntu before_cache: - > diff --git a/tests/assertions.yml b/tests/assertions.yml index 1e701309e..a48a29325 100644 --- a/tests/assertions.yml +++ b/tests/assertions.yml @@ -1,37 +1,54 @@ --- -- name: Check that ruby exists - shell: . $HOME/.bash_profile && ruby -v | cut -c1-4 - args: - executable: /bin/bash - register: check_ruby +- name: Check default ruby version + shell: + cmd: bash -lc 'ruby -v | cut -c1-10' + register: check_ruby_default changed_when: false - assert: that: - - check_ruby.stdout == 'ruby' - - check_ruby.rc == 0 - msg: No ruby installed + - check_ruby_default.stdout == 'ruby 2.7.1' + - check_ruby_default.rc == 0 + msg: Default ruby version is wrong -- name: Check default ruby - shell: ~/.rvm/wrappers/default/ruby -v | cut -c1-10 - register: check_ruby_default +- name: Check that rvm is in use + shell: + cmd: bash -lc 'which ruby' + register: check_rvm_loaded changed_when: false - assert: that: - - check_ruby_default.stdout == 'ruby 2.7.1' - msg: No default ruby installed + - check_rvm_loaded.stdout == '{{ rvm1_install_path }}/rubies/ruby-2.7.1/bin/ruby' + - check_rvm_loaded.rc == 0 + msg: Default ruby is in the wrong path - name: Check multiple rubies - command: ls ~/.rvm/rubies + command: + cmd: bash -lc 'rvm list strings' register: check_ruby_multiple changed_when: false - assert: that: - "'ruby-2.6.6' in check_ruby_multiple.stdout" - "'ruby-2.7.1' in check_ruby_multiple.stdout" + - check_ruby_multiple.rc == 0 msg: No multiple rubies installed +- name: Check ruby switch + command: + cmd: bash -lc 'rvm use 2.6.6 && ruby -v | cut -c1-10' + register: check_ruby_switch + changed_when: false +- assert: + that: + - "'Using {{ rvm1_install_path }}/gems/ruby-2.6.6' in check_ruby_switch.stdout" + - "'ruby 2.6.6' in check_ruby_switch.stdout" + - check_ruby_switch.rc == 0 + msg: Failed to switch the ruby version + - name: Check bundler symlinked on system path - shell: ls ~/.rvm/wrappers/default/ | grep 'bundler' + shell: + cmd: ls wrappers/default/ | grep 'bundler' + chdir: "{{ rvm1_install_path }}" register: check_ruby_bundler changed_when: false - assert: diff --git a/tests/root.yml b/tests/root.yml index 50484f2fc..f9cbc1be3 100644 --- a/tests/root.yml +++ b/tests/root.yml @@ -5,15 +5,19 @@ vars: rvm1_user: root rvm1_install_flags: '--auto-dotfiles' - rvm1_install_path: '/home/{{ rvm1_user }}/.rvm' + rvm1_install_path: '/opt/rvm' rvm1_rubies: - 'ruby-2.6.6' - 'ruby-2.7.1' roles: - rvm1-ansible + tags: setup - name: RVM Setup Validation hosts: all gather_facts: false + vars: + rvm1_install_path: '/opt/rvm' tasks: - import_tasks: assertions.yml + tags: validate \ No newline at end of file diff --git a/tests/user.yml b/tests/user.yml index 05bf740a2..b7a1c19f4 100644 --- a/tests/user.yml +++ b/tests/user.yml @@ -12,10 +12,14 @@ roles: - role: rvm1-ansible become: yes + tags: setup - name: RVM Setup Validation hosts: all gather_facts: false remote_user: user + vars: + rvm1_install_path: '/home/user/.rvm' tasks: - import_tasks: assertions.yml + tags: validate \ No newline at end of file From b78e334f09b2e8b8818833e614a777df74433a0c Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sat, 25 Jul 2020 08:12:29 +0200 Subject: [PATCH 3/9] README: Update 'Requirements' section --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f1ba42c58..6b62c6bb3 100644 --- a/README.md +++ b/README.md @@ -163,9 +163,14 @@ Just add `--extra-vars 'rvm1_delete_ruby=ruby-2.1.0'` to the end of your play bo ## Requirements -- Tested on CentOS 6 and 7 -- Tested on Debian 8 and 9 -- Tested on Ubuntu 14.04 and 16.04 +Potentially, any Linux/Unix system supported by Ansible and satisfying the [RVM prerequisites](https://rvm.io/rvm/prerequisites) should work. + +Compatibility with Linux distributions based on Debian, Ubuntu or Redhat families is actively tested. + +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 ## Ansible galaxy From 30c332137bda7108e92f960c31dd5f9fe62e7a13 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sat, 25 Jul 2020 08:13:56 +0200 Subject: [PATCH 4/9] Update CHANGELOG (test environment update - #215) --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79c46f33d..25186e569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Fixes regression forbidding installation of rubies (#209, fixed via #207) * Fix conditional logic for detecting and removing versions of Ruby (#212) * Report when Ruby is removed and don't ignore when version listing fails (#212) +* Update and enhance the test environment (#215) ### 2.1.2 2018-12-28 · [Changes](https://github.com/rvm/rvm1-ansible/compare/v2.1.1...v2.1.2) From b58aaa994b3bd3df8e5baeea850da920678a06e4 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sat, 1 Aug 2020 08:40:15 +0200 Subject: [PATCH 5/9] Travis CI: Parallelize the test matrix --- .travis.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 77dd293d0..819c22318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,17 @@ language: generic sudo: required env: - DOCKER_COMPOSE_VERSION: 1.26.2 + 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 @@ -12,34 +22,33 @@ services: cache: pip: true directories: - - $HOME/docker + - $DOCKER_CACHE_DIR before_install: - - if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi + - 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==2.9.9 > /dev/null 2>&1 + - sudo pip install ansible==$ANSIBLE_VERSION > /dev/null 2>&1 script: - cd tests - - docker-compose up -d - - ansible-playbook user.yml -l centos - - ansible-playbook user.yml -l debian - - ansible-playbook user.yml -l ubuntu - - docker-compose down - - docker-compose up -d - - ansible-playbook root.yml -l centos - - ansible-playbook root.yml -l debian - - ansible-playbook root.yml -l ubuntu + - 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 $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}' - | xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz' + 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 f5d48d3f4b33cc87fc24a91b600ed1b8e6a99207 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sat, 1 Aug 2020 08:41:00 +0200 Subject: [PATCH 6/9] Tests: Use variables for the Ruby versions to be installed --- tests/assertions.yml | 14 +++++++------- tests/group_vars/all | 7 +++++++ tests/root.yml | 4 ++-- tests/user.yml | 4 ++-- 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 tests/group_vars/all diff --git a/tests/assertions.yml b/tests/assertions.yml index a48a29325..0f13a26f8 100644 --- a/tests/assertions.yml +++ b/tests/assertions.yml @@ -6,7 +6,7 @@ changed_when: false - assert: that: - - check_ruby_default.stdout == 'ruby 2.7.1' + - check_ruby_default.stdout == 'ruby {{ rvm_tests_mri_version_default }}' - check_ruby_default.rc == 0 msg: Default ruby version is wrong @@ -17,7 +17,7 @@ changed_when: false - assert: that: - - check_rvm_loaded.stdout == '{{ rvm1_install_path }}/rubies/ruby-2.7.1/bin/ruby' + - check_rvm_loaded.stdout == '{{ rvm1_install_path }}/rubies/ruby-{{ rvm_tests_mri_version_default }}/bin/ruby' - check_rvm_loaded.rc == 0 msg: Default ruby is in the wrong path @@ -28,20 +28,20 @@ changed_when: false - assert: that: - - "'ruby-2.6.6' in check_ruby_multiple.stdout" - - "'ruby-2.7.1' in check_ruby_multiple.stdout" + - "'ruby-{{ rvm_tests_mri_version_other }}' in check_ruby_multiple.stdout" + - "'ruby-{{ rvm_tests_mri_version_default }}' in check_ruby_multiple.stdout" - check_ruby_multiple.rc == 0 msg: No multiple rubies installed - name: Check ruby switch command: - cmd: bash -lc 'rvm use 2.6.6 && ruby -v | cut -c1-10' + cmd: bash -lc 'rvm use {{ rvm_tests_mri_version_other }} && ruby -v | cut -c1-10' register: check_ruby_switch changed_when: false - assert: that: - - "'Using {{ rvm1_install_path }}/gems/ruby-2.6.6' in check_ruby_switch.stdout" - - "'ruby 2.6.6' in check_ruby_switch.stdout" + - "'Using {{ rvm1_install_path }}/gems/ruby-{{ rvm_tests_mri_version_other }}' in check_ruby_switch.stdout" + - "'ruby {{ rvm_tests_mri_version_other }}' in check_ruby_switch.stdout" - check_ruby_switch.rc == 0 msg: Failed to switch the ruby version diff --git a/tests/group_vars/all b/tests/group_vars/all new file mode 100644 index 000000000..07150f6b4 --- /dev/null +++ b/tests/group_vars/all @@ -0,0 +1,7 @@ +--- +rvm_tests_mri_version_default: 2.7.1 +rvm_tests_mri_version_other: 2.6.6 + +# Upcoming +# rvm_tests_jruby_version_x: 9.2.12.0 +# ... \ No newline at end of file diff --git a/tests/root.yml b/tests/root.yml index f9cbc1be3..0372b0d25 100644 --- a/tests/root.yml +++ b/tests/root.yml @@ -7,8 +7,8 @@ rvm1_install_flags: '--auto-dotfiles' rvm1_install_path: '/opt/rvm' rvm1_rubies: - - 'ruby-2.6.6' - - 'ruby-2.7.1' + - 'ruby-{{ rvm_tests_mri_version_other }}' + - 'ruby-{{ rvm_tests_mri_version_default }}' roles: - rvm1-ansible tags: setup diff --git a/tests/user.yml b/tests/user.yml index b7a1c19f4..d7f77dfc6 100644 --- a/tests/user.yml +++ b/tests/user.yml @@ -7,8 +7,8 @@ rvm1_user: user rvm1_install_path: '/home/{{ rvm1_user }}/.rvm' rvm1_rubies: - - 'ruby-2.6.6' - - 'ruby-2.7.1' + - 'ruby-{{ rvm_tests_mri_version_other }}' + - 'ruby-{{ rvm_tests_mri_version_default }}' roles: - role: rvm1-ansible become: yes From 58e5fd48cf328f0924f35b338d86c17781f9db82 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Tue, 28 Jul 2020 08:35:56 +0200 Subject: [PATCH 7/9] Cleanup: Sort platform versions in ascending order As requested during pull request review. --- tests/docker-compose.yml | 30 +++++++++++++++--------------- tests/inventory | 14 +++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index fc0858f67..2e27ed732 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,35 +1,35 @@ version: "3" services: - centos8: - build: ./dockerfiles/centos8 + centos6: + build: ./dockerfiles/centos6 cap_add: [ALL] centos7: build: ./dockerfiles/centos7 cap_add: [ALL] - centos6: - build: ./dockerfiles/centos6 + centos8: + build: ./dockerfiles/centos8 cap_add: [ALL] - debian10: - build: ./dockerfiles/debian10 + debian8: + build: ./dockerfiles/debian8 cap_add: [ALL] debian9: build: ./dockerfiles/debian9 cap_add: [ALL] - debian8: - build: ./dockerfiles/debian8 + debian10: + build: ./dockerfiles/debian10 cap_add: [ALL] - ubuntu20: - build: ./dockerfiles/ubuntu20 - cap_add: [ALL] - ubuntu18: - build: ./dockerfiles/ubuntu18 + ubuntu14: + build: ./dockerfiles/ubuntu14 cap_add: [ALL] ubuntu16: build: ./dockerfiles/ubuntu16 cap_add: [ALL] - ubuntu14: - build: ./dockerfiles/ubuntu14 + ubuntu18: + build: ./dockerfiles/ubuntu18 + cap_add: [ALL] + ubuntu20: + build: ./dockerfiles/ubuntu20 cap_add: [ALL] diff --git a/tests/inventory b/tests/inventory index a8a6d2cc4..8467d29c9 100644 --- a/tests/inventory +++ b/tests/inventory @@ -1,15 +1,15 @@ [centos] -tests_centos8_1 ansible_connection=docker -tests_centos7_1 ansible_connection=docker tests_centos6_1 ansible_connection=docker +tests_centos7_1 ansible_connection=docker +tests_centos8_1 ansible_connection=docker [debian] -tests_debian10_1 ansible_connection=docker -tests_debian9_1 ansible_connection=docker tests_debian8_1 ansible_connection=docker +tests_debian9_1 ansible_connection=docker +tests_debian10_1 ansible_connection=docker [ubuntu] -tests_ubuntu20_1 ansible_connection=docker -tests_ubuntu18_1 ansible_connection=docker -tests_ubuntu16_1 ansible_connection=docker tests_ubuntu14_1 ansible_connection=docker +tests_ubuntu16_1 ansible_connection=docker +tests_ubuntu18_1 ansible_connection=docker +tests_ubuntu20_1 ansible_connection=docker From ae327bdce0ab09201c01b007fc87d552141a0137 Mon Sep 17 00:00:00 2001 From: Piotr Kuczynski Date: Thu, 30 Jul 2020 12:24:34 +0200 Subject: [PATCH 8/9] Update CHANGELOG.md --- CHANGELOG.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25186e569..5fa5fa88f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,31 @@ ### NEXT -* Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) (#204) +#### New features + +* Report when Ruby is removed and don't ignore when version listing fails (#212) + +#### Bug fixes + +* Fix bare variables in conditionals (deprecation warnings with Ansible 2.8+) (#204) * Fix boolean values when checking array (#207) -* Fixes regression forbidding installation of rubies (#209, fixed via #207) +* Fix regression forbidding installation of rubies (#209, fixed via #207) * Fix conditional logic for detecting and removing versions of Ruby (#212) -* Report when Ruby is removed and don't ignore when version listing fails (#212) -* Update and enhance the test environment (#215) + +#### Changes + +* Extend test matrix with: (#215) + * CentOS 8, Debian 10, Ubuntu 18.04 and 20.04 + * Ruby 2.6.6 and 2.7.1 +* Modify some test assertions to better abstract RVM behaviour from its internal implementation ("blackbox" testing) (#205) +* Fix and enhance Travis CI setup (#205) + * Install more recent versions of Ruby, to be compatible with latest Bundler version + * Validate system-wide setup (root.yml) + * Parallelize the tests to speed up the builds ### 2.1.2 2018-12-28 · [Changes](https://github.com/rvm/rvm1-ansible/compare/v2.1.1...v2.1.2) -) + * Fallback to alternative GPG key servers (#192) * Remove keys.gnupg.net in favour of pool.sks-keyservers.net (#192) From 943ff233833892bf97be6b149fce09cdd9007f67 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Sat, 1 Aug 2020 08:19:22 +0200 Subject: [PATCH 9/9] Travis CI: Fail fast --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 819c22318..85469a186 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ cache: - $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