Skip to content

Commit 5952779

Browse files
authored
Use amd64 platform for Molecule tests (#231)
1 parent ebd0145 commit 5952779

File tree

6 files changed

+31
-1
lines changed

6 files changed

+31
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ The Alpine Linux `libelf` dependency is no longer automatically installed by NGI
1212

1313
TESTS:
1414

15-
Update GitHub actions to run on Ubuntu 22.04 (and thus support `cgroups` v2).
15+
* Update GitHub actions to run on Ubuntu 22.04 (and thus support `cgroups` v2).
16+
* Explicitly specify `amd64` as the platform used in Molecule tests. This will ensure that tests work as expected when run on different host architectures (e.g. newer Macbooks with `arm` processors).
1617

1718
## 0.8.1 (September 28, 2022)
1819

molecule/advanced/molecule.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ lint: |
1111
platforms:
1212
- name: test-workload
1313
image: nginxdemos/hello
14+
platform: amd64
1415
privileged: true
1516
groups:
1617
- workload
@@ -19,6 +20,7 @@ platforms:
1920
- name: centos-7
2021
image: centos:7
2122
dockerfile: ../common/Dockerfile.j2
23+
platform: amd64
2224
privileged: true
2325
cgroupns_mode: host
2426
volumes:
@@ -30,6 +32,7 @@ platforms:
3032
- name: molecule-test
3133
- name: debian-buster
3234
image: debian:buster-slim
35+
platform: amd64
3336
dockerfile: ../common/Dockerfile.j2
3437
privileged: true
3538
cgroupns_mode: host
@@ -42,6 +45,7 @@ platforms:
4245
- name: molecule-test
4346
- name: ubuntu-bionic
4447
image: ubuntu:bionic
48+
platform: amd64
4549
dockerfile: ../common/Dockerfile.j2
4650
privileged: true
4751
cgroupns_mode: host
@@ -54,6 +58,7 @@ platforms:
5458
- name: molecule-test
5559
- name: ubuntu-focal
5660
image: ubuntu:focal
61+
platform: amd64
5762
dockerfile: ../common/Dockerfile.j2
5863
privileged: true
5964
cgroupns_mode: host

molecule/default/molecule.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ lint: |
77
platforms:
88
- name: amazonlinux-2
99
image: amazonlinux:2
10+
platform: amd64
1011
dockerfile: ../common/Dockerfile.j2
1112
privileged: true
1213
cgroupns_mode: host
@@ -15,6 +16,7 @@ platforms:
1516
command: /usr/sbin/init
1617
- name: centos-7
1718
image: centos:7
19+
platform: amd64
1820
dockerfile: ../common/Dockerfile.j2
1921
privileged: true
2022
cgroupns_mode: host
@@ -23,6 +25,7 @@ platforms:
2325
command: /usr/sbin/init
2426
- name: rhel-7
2527
image: registry.access.redhat.com/ubi7/ubi:7.9
28+
platform: amd64
2629
dockerfile: ../common/Dockerfile.j2
2730
privileged: true
2831
cgroupns_mode: host
@@ -31,6 +34,7 @@ platforms:
3134
command: /usr/sbin/init
3235
- name: rhel-8
3336
image: registry.access.redhat.com/ubi8/ubi:8.5
37+
platform: amd64
3438
dockerfile: ../common/Dockerfile.j2
3539
privileged: true
3640
cgroupns_mode: host
@@ -39,6 +43,7 @@ platforms:
3943
command: /usr/sbin/init
4044
- name: debian-buster
4145
image: debian:buster-slim
46+
platform: amd64
4247
dockerfile: ../common/Dockerfile.j2
4348
privileged: true
4449
cgroupns_mode: host
@@ -47,6 +52,7 @@ platforms:
4752
command: /sbin/init
4853
- name: ubuntu-bionic
4954
image: ubuntu:bionic
55+
platform: amd64
5056
dockerfile: ../common/Dockerfile.j2
5157
privileged: true
5258
cgroupns_mode: host
@@ -55,6 +61,7 @@ platforms:
5561
command: /sbin/init
5662
- name: ubuntu-focal
5763
image: ubuntu:focal
64+
platform: amd64
5865
dockerfile: ../common/Dockerfile.j2
5966
privileged: true
6067
cgroupns_mode: host

molecule/dos/molecule.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ lint: |
77
platforms:
88
- name: alpine-3.15
99
image: alpine:3.15
10+
platform: amd64
1011
dockerfile: ../common/Dockerfile.j2
1112
privileged: true
1213
cgroupns_mode: host
@@ -15,6 +16,7 @@ platforms:
1516
command: /sbin/init
1617
- name: centos-7
1718
image: centos:7
19+
platform: amd64
1820
dockerfile: ../common/Dockerfile.j2
1921
privileged: true
2022
cgroupns_mode: host
@@ -23,6 +25,7 @@ platforms:
2325
command: /usr/sbin/init
2426
- name: rhel-7
2527
image: registry.access.redhat.com/ubi7/ubi:7.9
28+
platform: amd64
2629
dockerfile: ../common/Dockerfile.j2
2730
privileged: true
2831
cgroupns_mode: host
@@ -31,6 +34,7 @@ platforms:
3134
command: /usr/sbin/init
3235
- name: rhel-8
3336
image: registry.access.redhat.com/ubi8/ubi:8.5
37+
platform: amd64
3438
dockerfile: ../common/Dockerfile.j2
3539
privileged: true
3640
cgroupns_mode: host
@@ -39,6 +43,7 @@ platforms:
3943
command: /usr/sbin/init
4044
- name: debian-buster
4145
image: debian:buster-slim
46+
platform: amd64
4247
dockerfile: ../common/Dockerfile.j2
4348
privileged: true
4449
cgroupns_mode: host
@@ -47,6 +52,7 @@ platforms:
4752
command: /sbin/init
4853
- name: debian-bullseye
4954
image: debian:bullseye-slim
55+
platform: amd64
5056
dockerfile: ../common/Dockerfile.j2
5157
privileged: true
5258
cgroupns_mode: host
@@ -55,6 +61,7 @@ platforms:
5561
command: /sbin/init
5662
- name: ubuntu-bionic
5763
image: ubuntu:bionic
64+
platform: amd64
5865
dockerfile: ../common/Dockerfile.j2
5966
privileged: true
6067
cgroupns_mode: host
@@ -63,6 +70,7 @@ platforms:
6370
command: /sbin/init
6471
- name: ubuntu-focal
6572
image: ubuntu:focal
73+
platform: amd64
6674
dockerfile: ../common/Dockerfile.j2
6775
privileged: true
6876
cgroupns_mode: host

molecule/specific-version/molecule.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ lint: |
77
platforms:
88
- name: centos-7
99
image: centos:7
10+
platform: amd64
1011
dockerfile: ../common/Dockerfile.j2
1112
privileged: true
1213
cgroupns_mode: host
@@ -15,6 +16,7 @@ platforms:
1516
command: /usr/sbin/init
1617
- name: rhel-7
1718
image: registry.access.redhat.com/ubi7/ubi:7.9
19+
platform: amd64
1820
dockerfile: ../common/Dockerfile.j2
1921
privileged: true
2022
cgroupns_mode: host
@@ -23,6 +25,7 @@ platforms:
2325
command: /usr/sbin/init
2426
- name: debian-buster
2527
image: debian:buster-slim
28+
platform: amd64
2629
dockerfile: ../common/Dockerfile.j2
2730
privileged: true
2831
cgroupns_mode: host
@@ -31,6 +34,7 @@ platforms:
3134
command: /sbin/init
3235
- name: ubuntu-bionic
3336
image: ubuntu:bionic
37+
platform: amd64
3438
dockerfile: ../common/Dockerfile.j2
3539
privileged: true
3640
cgroupns_mode: host
@@ -39,6 +43,7 @@ platforms:
3943
command: /sbin/init
4044
- name: ubuntu-focal
4145
image: ubuntu:focal
46+
platform: amd64
4247
dockerfile: ../common/Dockerfile.j2
4348
privileged: true
4449
cgroupns_mode: host

molecule/uninstall/molecule.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ lint: |
77
platforms: # Ubuntu bionic and Debian buster result in a segmentation fault error as of Ansible core 2.13
88
- name: centos-7
99
image: centos:7
10+
platform: amd64
1011
dockerfile: ../common/Dockerfile.j2
1112
privileged: true
1213
cgroupns_mode: host
@@ -15,6 +16,7 @@ platforms: # Ubuntu bionic and Debian buster result in a segmentation fault erro
1516
command: /usr/sbin/init
1617
- name: rhel-7
1718
image: registry.access.redhat.com/ubi7/ubi:7.9
19+
platform: amd64
1820
dockerfile: ../common/Dockerfile.j2
1921
privileged: true
2022
cgroupns_mode: host
@@ -23,6 +25,7 @@ platforms: # Ubuntu bionic and Debian buster result in a segmentation fault erro
2325
command: /usr/sbin/init
2426
- name: rhel-8
2527
image: registry.access.redhat.com/ubi8/ubi:8.5
28+
platform: amd64
2629
dockerfile: ../common/Dockerfile.j2
2730
privileged: true
2831
cgroupns_mode: host
@@ -31,6 +34,7 @@ platforms: # Ubuntu bionic and Debian buster result in a segmentation fault erro
3134
command: /usr/sbin/init
3235
- name: ubuntu-focal
3336
image: ubuntu:focal
37+
platform: amd64
3438
dockerfile: ../common/Dockerfile.j2
3539
privileged: true
3640
cgroupns_mode: host

0 commit comments

Comments
 (0)