Skip to content

Commit b1b7f92

Browse files
authored
Add s390x as a platform for Molecule tests (#580)
1 parent 8163ece commit b1b7f92

File tree

15 files changed

+133
-72
lines changed

15 files changed

+133
-72
lines changed

.github/workflows/molecule.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
3939
uses: actions/checkout@v3
4040

41+
- name: Set up Docker QEMU
42+
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
43+
uses: docker/setup-qemu-action@v2
44+
with:
45+
platforms: aarch64,s390x
46+
4147
- name: Set up Python 3
4248
if: ${{ !(contains(matrix.scenario, 'plus')) || (env.NGINX_CRT != 0 && env.NGINX_KEY != 0) }}
4349
uses: actions/setup-python@v4

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ BUG FIXES:
3535
* GitHub actions should now correctly skip \*plus\* scenarios only when the NGINX Plus license secrets are not present.
3636
* Update the versions of the various packages required to build NGINX from source. The version of `zlib` listed in the role was no longer available.
3737
* The `ignore-tags` GitHub actions key does not exist. Replace it with the correct key, `tags-ignore`.
38+
* Remove the `arch` option from the Debian family NGINX repository source. In its current form this prevented the role from working any platforms beyond `x86_64`/`amd64` and `aarch64`/`arm64`.
3839

3940
TESTS:
4041

4142
* Update GitHub actions to run on Ubuntu 22.04 (and thus support `cgroups` v2).
42-
* Explicitly specify `amd64` as the platform used in the Amazon Linux 2/CentOS/Oracle Linux/RHEL 7/SLES 15 Molecule Docker images. This will ensure that tests work when run on different host architectures (e.g. newer Macbooks with `arm64` processors) when running tests in distributions that only support `amd64` (either due to lack of support for a `cgroups` v2 backport or due to lack of builds for `arm64`).
43+
* Explicitly specify `x86_64`/`amd64` as the platform used in the Amazon Linux 2/CentOS/Oracle Linux/RHEL 7/SLES 15 Molecule Docker images. This will ensure that tests work when run on different host architectures (e.g. newer Macbooks with `aarch64`/`arm64` processors) when running tests in distributions that only support `x86_64` (either due to lack of support for a `cgroups` v2 backport or due to lack of builds for `aarch64`).
44+
* Explicitly test some distributions using `aarch64` and `s390x` as the Molecule platform. This should ensure the role works as intended across the various architectures that are officially supported.
4345

4446
## 0.23.2 (September 28, 2022)
4547

defaults/main/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ nginx_static_modules: [http_ssl_module]
6868
# (Optional) Specify repository for NGINX Open Source or NGINX Plus.
6969
# Only works if 'install_from' is set to 'nginx_repository' when installing NGINX Open Source.
7070
# Defaults are the official NGINX repositories.
71-
# nginx_repository: deb [arch=amd64] https://nginx.org/packages/mainline/debian/ buster nginx
71+
# nginx_repository: deb https://nginx.org/packages/mainline/debian/ buster nginx
7272

7373
# Specify which branch of NGINX Open Source you want to install.
7474
# Options are 'mainline' or 'stable'.

molecule/default/molecule.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ platforms:
3939
command: /sbin/init
4040
- name: alpine-3.16
4141
image: alpine:3.16
42+
platform: x86_64
4243
dockerfile: ../common/Dockerfile.j2
4344
privileged: true
4445
cgroupns_mode: host
@@ -47,6 +48,7 @@ platforms:
4748
command: /sbin/init
4849
- name: alpine-3.17
4950
image: alpine:3.17
51+
platform: aarch64
5052
dockerfile: ../common/Dockerfile.j2
5153
privileged: true
5254
cgroupns_mode: host
@@ -55,7 +57,7 @@ platforms:
5557
command: /sbin/init
5658
- name: amazonlinux-2
5759
image: amazonlinux:2
58-
platform: amd64
60+
platform: x86_64
5961
dockerfile: ../common/Dockerfile.j2
6062
privileged: true
6163
cgroupns_mode: host
@@ -64,7 +66,7 @@ platforms:
6466
command: /usr/sbin/init
6567
- name: centos-7
6668
image: centos:7
67-
platform: amd64
69+
platform: x86_64
6870
dockerfile: ../common/Dockerfile.j2
6971
privileged: true
7072
cgroupns_mode: host
@@ -81,7 +83,7 @@ platforms:
8183
command: /sbin/init
8284
- name: oraclelinux-7
8385
image: oraclelinux:7
84-
platform: amd64
86+
platform: x86_64
8587
dockerfile: ../common/Dockerfile.j2
8688
privileged: true
8789
cgroupns_mode: host
@@ -106,7 +108,7 @@ platforms:
106108
command: /usr/sbin/init
107109
- name: rhel-7
108110
image: registry.access.redhat.com/ubi7:7.9
109-
platform: amd64
111+
platform: x86_64
110112
dockerfile: ../common/Dockerfile.j2
111113
privileged: true
112114
cgroupns_mode: host
@@ -115,6 +117,7 @@ platforms:
115117
command: /usr/sbin/init
116118
- name: rhel-8
117119
image: redhat/ubi8:8.7
120+
platform: s390x
118121
dockerfile: ../common/Dockerfile.j2
119122
privileged: true
120123
cgroupns_mode: host
@@ -123,6 +126,7 @@ platforms:
123126
command: /usr/sbin/init
124127
- name: rhel-9
125128
image: redhat/ubi9:9.1.0
129+
platform: aarch64
126130
dockerfile: ../common/Dockerfile.j2
127131
privileged: true
128132
cgroupns_mode: host
@@ -147,7 +151,7 @@ platforms:
147151
command: /usr/sbin/init
148152
- name: sles15
149153
image: registry.suse.com/bci/bci-base:15.4
150-
platform: amd64
154+
platform: x86_64
151155
dockerfile: ../common/Dockerfile.j2
152156
privileged: true
153157
cgroupns_mode: host
@@ -156,6 +160,7 @@ platforms:
156160
command: /usr/sbin/init
157161
- name: ubuntu-bionic
158162
image: ubuntu:bionic
163+
platform: x86_64
159164
dockerfile: ../common/Dockerfile.j2
160165
privileged: true
161166
cgroupns_mode: host
@@ -164,6 +169,7 @@ platforms:
164169
command: /sbin/init
165170
- name: ubuntu-focal
166171
image: ubuntu:focal
172+
platform: s390x
167173
dockerfile: ../common/Dockerfile.j2
168174
privileged: true
169175
cgroupns_mode: host
@@ -172,6 +178,7 @@ platforms:
172178
command: /sbin/init
173179
- name: ubuntu-jammy
174180
image: ubuntu:jammy
181+
platform: aarch64
175182
dockerfile: ../common/Dockerfile.j2
176183
privileged: true
177184
cgroupns_mode: host

molecule/downgrade/molecule.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ platforms:
3939
command: /sbin/init
4040
- name: alpine-3.16
4141
image: alpine:3.16
42+
platform: x86_64
4243
dockerfile: ../common/Dockerfile.j2
4344
privileged: true
4445
cgroupns_mode: host
@@ -47,6 +48,7 @@ platforms:
4748
command: /sbin/init
4849
- name: alpine-3.17
4950
image: alpine:3.17
51+
platform: aarch64
5052
dockerfile: ../common/Dockerfile.j2
5153
privileged: true
5254
cgroupns_mode: host
@@ -55,7 +57,7 @@ platforms:
5557
command: /sbin/init
5658
- name: amazonlinux-2
5759
image: amazonlinux:2
58-
platform: amd64
60+
platform: x86_64
5961
dockerfile: ../common/Dockerfile.j2
6062
privileged: true
6163
cgroupns_mode: host
@@ -64,7 +66,7 @@ platforms:
6466
command: /usr/sbin/init
6567
- name: centos-7
6668
image: centos:7
67-
platform: amd64
69+
platform: x86_64
6870
dockerfile: ../common/Dockerfile.j2
6971
privileged: true
7072
cgroupns_mode: host
@@ -81,7 +83,7 @@ platforms:
8183
command: /sbin/init
8284
- name: oraclelinux-7
8385
image: oraclelinux:7
84-
platform: amd64
86+
platform: x86_64
8587
dockerfile: ../common/Dockerfile.j2
8688
privileged: true
8789
cgroupns_mode: host
@@ -106,7 +108,7 @@ platforms:
106108
command: /usr/sbin/init
107109
- name: rhel-7
108110
image: registry.access.redhat.com/ubi7:7.9
109-
platform: amd64
111+
platform: x86_64
110112
dockerfile: ../common/Dockerfile.j2
111113
privileged: true
112114
cgroupns_mode: host
@@ -115,6 +117,7 @@ platforms:
115117
command: /usr/sbin/init
116118
- name: rhel-8
117119
image: redhat/ubi8:8.7
120+
platform: s390x
118121
dockerfile: ../common/Dockerfile.j2
119122
privileged: true
120123
cgroupns_mode: host
@@ -123,6 +126,7 @@ platforms:
123126
command: /usr/sbin/init
124127
- name: rhel-9
125128
image: redhat/ubi9:9.1.0
129+
platform: aarch64
126130
dockerfile: ../common/Dockerfile.j2
127131
privileged: true
128132
cgroupns_mode: host
@@ -147,7 +151,7 @@ platforms:
147151
command: /usr/sbin/init
148152
- name: sles15
149153
image: registry.suse.com/bci/bci-base:15.4
150-
platform: amd64
154+
platform: x86_64
151155
dockerfile: ../common/Dockerfile.j2
152156
privileged: true
153157
cgroupns_mode: host
@@ -156,6 +160,7 @@ platforms:
156160
command: /usr/sbin/init
157161
- name: ubuntu-bionic
158162
image: ubuntu:bionic
163+
platform: x86_64
159164
dockerfile: ../common/Dockerfile.j2
160165
privileged: true
161166
cgroupns_mode: host
@@ -164,6 +169,7 @@ platforms:
164169
command: /sbin/init
165170
- name: ubuntu-focal
166171
image: ubuntu:focal
172+
platform: s390x
167173
dockerfile: ../common/Dockerfile.j2
168174
privileged: true
169175
cgroupns_mode: host
@@ -172,6 +178,7 @@ platforms:
172178
command: /sbin/init
173179
- name: ubuntu-jammy
174180
image: ubuntu:jammy
181+
platform: aarch64
175182
dockerfile: ../common/Dockerfile.j2
176183
privileged: true
177184
cgroupns_mode: host

molecule/downgrade_plus/molecule.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
4747
command: /sbin/init
4848
- name: alpine-3.16
4949
image: alpine:3.16
50+
platform: x86_64
5051
dockerfile: ../common/Dockerfile.j2
5152
privileged: true
5253
cgroupns_mode: host
@@ -55,7 +56,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
5556
command: /sbin/init
5657
- name: amazonlinux-2
5758
image: amazonlinux:2
58-
platform: amd64
59+
platform: x86_64
5960
dockerfile: ../common/Dockerfile.j2
6061
privileged: true
6162
cgroupns_mode: host
@@ -64,7 +65,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
6465
command: /usr/sbin/init
6566
- name: centos-7
6667
image: centos:7
67-
platform: amd64
68+
platform: x86_64
6869
dockerfile: ../common/Dockerfile.j2
6970
privileged: true
7071
cgroupns_mode: host
@@ -81,7 +82,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
8182
command: /sbin/init
8283
- name: oraclelinux-7
8384
image: oraclelinux:7
84-
platform: amd64
85+
platform: x86_64
8586
dockerfile: ../common/Dockerfile.j2
8687
privileged: true
8788
cgroupns_mode: host
@@ -106,7 +107,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
106107
command: /usr/sbin/init
107108
- name: rhel-7
108109
image: registry.access.redhat.com/ubi7:7.9
109-
platform: amd64
110+
platform: x86_64
110111
dockerfile: ../common/Dockerfile.j2
111112
privileged: true
112113
cgroupns_mode: host
@@ -115,6 +116,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
115116
command: /usr/sbin/init
116117
- name: rhel-8
117118
image: redhat/ubi8:8.7
119+
platform: s390x
118120
dockerfile: ../common/Dockerfile.j2
119121
privileged: true
120122
cgroupns_mode: host
@@ -123,6 +125,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
123125
command: /usr/sbin/init
124126
- name: rhel-9
125127
image: redhat/ubi9:9.1.0
128+
platform: aarch64
126129
dockerfile: ../common/Dockerfile.j2
127130
privileged: true
128131
cgroupns_mode: host
@@ -147,7 +150,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
147150
command: /usr/sbin/init
148151
- name: sles15
149152
image: registry.suse.com/bci/bci-base:15.4
150-
platform: amd64
153+
platform: x86_64
151154
dockerfile: ../common/Dockerfile.j2
152155
privileged: true
153156
cgroupns_mode: host
@@ -156,6 +159,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
156159
command: /usr/sbin/init
157160
- name: ubuntu-bionic
158161
image: ubuntu:bionic
162+
platform: x86_64
159163
dockerfile: ../common/Dockerfile.j2
160164
privileged: true
161165
cgroupns_mode: host
@@ -164,6 +168,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
164168
command: /sbin/init
165169
- name: ubuntu-focal
166170
image: ubuntu:focal
171+
platform: s390x
167172
dockerfile: ../common/Dockerfile.j2
168173
privileged: true
169174
cgroupns_mode: host
@@ -172,6 +177,7 @@ platforms: # Alpine 3.17 only has one version of NGINX Plus available (at the mo
172177
command: /sbin/init
173178
- name: ubuntu-jammy
174179
image: ubuntu:jammy
180+
platform: aarch64
175181
dockerfile: ../common/Dockerfile.j2
176182
privileged: true
177183
cgroupns_mode: host

0 commit comments

Comments
 (0)