Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Molecule to remove Alpine Linux 3.15 #697

Merged
merged 7 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

FEATURES:

- Add Alpine Linux 3.19 to the list of NGINX Plus tested and supported distributions.
- Remove Alpine Linux 3.15 from the list of NGINX Plus tested and supported distributions.
- Add Alpine Linux 3.19 to the list of NGINX Open Source and NGINX Plus tested and supported distributions.
- Remove Alpine Linux 3.15 from the list of NGINX Open Source and NGINX Plus tested and supported distributions.

ENHANCEMENTS:

Expand All @@ -19,7 +19,8 @@ BUG FIXES:
CI/CD:

- Add Molecule tests for NGINX Amplify.
- Use the local role name (`ansible-role-nginx`) instead of the fully qualified role name (`nginxinc.nginx`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand.
- Update the RHEL based tests to use the latest UBI release.
- Use the local role name (`ansible-role-nginx`) instead of the fully qualified role name (`nginxinc.nginx`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand.

## 0.24.2 (October 3rd, 2023)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ AlmaLinux:
- 8
- 9
Alpine:
- 3.15
- 3.16
- 3.17
- 3.18
- 3.19
Amazon Linux:
- 2
CentOS:
Expand Down
2 changes: 1 addition & 1 deletion molecule/amplify/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

- name: Containers are not up, quit from here
ansible.builtin.fail:
when: container['failed']
when: container['failed'] | bool

- name: Gather facts
ansible.builtin.setup:
Expand Down
2 changes: 1 addition & 1 deletion molecule/amplify/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down
20 changes: 10 additions & 10 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -52,6 +44,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
platform: x86_64
Expand Down Expand Up @@ -121,7 +121,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-8
image: redhat/ubi8:8.7
image: redhat/ubi8:8.9
# platform: s390x
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand All @@ -130,7 +130,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down
20 changes: 10 additions & 10 deletions molecule/distribution/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -52,6 +44,14 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
platform: x86_64
Expand Down Expand Up @@ -121,7 +121,7 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# command: /usr/sbin/init
- name: rhel-8
image: redhat/ubi8:8.7
image: redhat/ubi8:8.9
# platform: s390x
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand All @@ -130,7 +130,7 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down
4 changes: 4 additions & 0 deletions molecule/downgrade-plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =30-r1
cacheable: true
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =30-1~{{ ansible_facts['distribution_release'] }}
cacheable: true
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -30-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =30-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
9 changes: 7 additions & 2 deletions molecule/downgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-8
image: redhat/ubi8:8.7
image: redhat/ubi8:8.9
# platform: s390x
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand All @@ -130,7 +130,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down Expand Up @@ -187,3 +187,8 @@ provisioner:
prepare: prepare.yml
converge: converge.yml
verify: verify.yml
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
6 changes: 3 additions & 3 deletions molecule/downgrade-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
hosts: localhost
gather_facts: false
tasks:
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
- name: Create ephemeral license certificate file from b64 decoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: "0444"

- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
- name: Create ephemeral license key file from b64 decoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
Expand All @@ -22,7 +22,7 @@
tasks:
- name: Install NGINX
ansible.builtin.include_role:
name: nginxinc.nginx
name: ansible-role-nginx
vars:
nginx_type: plus
nginx_license:
Expand Down
4 changes: 2 additions & 2 deletions molecule/downgrade-plus/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search('30')
register: current_version
failed_when: current_version is not search(version | regex_search('[0-9]+'))
12 changes: 8 additions & 4 deletions molecule/downgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =1.25.1-r1
version: =1.25.3-r1
cacheable: true
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =1.25.1-1~{{ ansible_facts['distribution_release'] }}
version: =1.25.3-1~{{ ansible_facts['distribution_release'] }}
cacheable: true
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -1.25.1-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -1.25.3-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =1.25.1-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
cacheable: true
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
25 changes: 15 additions & 10 deletions molecule/downgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -52,6 +44,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
platform: x86_64
Expand Down Expand Up @@ -121,7 +121,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-8
image: redhat/ubi8:8.7
image: redhat/ubi8:8.9
# platform: s390x
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand All @@ -130,7 +130,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down Expand Up @@ -196,3 +196,8 @@ provisioner:
prepare: prepare.yml
converge: converge.yml
verify: verify.yml
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/facts_cache
fact_caching_timeout: 7200
2 changes: 1 addition & 1 deletion molecule/downgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
tasks:
- name: Install NGINX
ansible.builtin.include_role:
name: nginxinc.nginx
name: ansible-role-nginx
4 changes: 2 additions & 2 deletions molecule/downgrade/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
args:
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search('1.25.1')
register: current_version
failed_when: current_version is not search(version | regex_search('([0-9]+\\.){2}[0-9]+'))
4 changes: 2 additions & 2 deletions molecule/plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-8
image: redhat/ubi8:8.7
image: redhat/ubi8:8.9
# platform: s390x
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand All @@ -130,7 +130,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
Expand Down
4 changes: 2 additions & 2 deletions molecule/plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
hosts: localhost
gather_facts: false
tasks:
- name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy
- name: Create ephemeral license certificate file from b64 decoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}"
dest: ../../files/license/nginx-repo.crt
force: false
mode: "0444"

- name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy
- name: Create ephemeral license key file from b64 decoded env var
ansible.builtin.copy:
content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}"
dest: ../../files/license/nginx-repo.key
Expand Down
Loading
Loading