Skip to content

Commit 0831f62

Browse files
committed
ci(e2e): add CentOS Stream 10 Docker/Podman/SELinux suite
PR #2092 adds SELinux relabeling (:z/:Z) support to the Docker and Podman driver bind mounts, but our existing E2E lanes run inside the Ubuntu-based ghcr.io/nvidia/openshell/ci container image, which does not enforce SELinux. That leaves the new relabeling behavior, and any future SELinux-sensitive change, without a host that can actually deny a mislabeled mount. The original version of this suite required an org admin to provision a GitHub-hosted RHEL 10 "larger runner", which isn't something CI changes in this repo can provision. Per discussion on PR #2093, swap that for a CentOS Stream 10 VM booted under QEMU/KVM on the existing self-hosted linux-amd64-cpu8 runner (already used by driver-vm-linux.yml with --privileged), driven entirely over SSH. This needs no new runner class: it downloads a CentOS Stream 10 GenericCloud image, seeds it with cloud-init over a generated ISO, boots it with hardware-accelerated QEMU, and copies the checked-out repo in over scp/tar. Once the guest is up, the suite installs Docker Engine and Podman side by side, confirms SELinux is Enforcing, runs the standard e2e:docker and e2e:podman suites, and fails the job if the audit log shows AVC denials during the run. It remains wired in as optional/non-blocking via the test:e2e-centos label (renamed from test:e2e-rhel), matching the existing test:e2e-kubernetes pattern. Documentation in CI.md and CONTRIBUTING.md is updated to reflect the renamed label and workflow. Signed-off-by: Eric Curtin <eric.curtin@docker.com>
1 parent 45614a3 commit 0831f62

5 files changed

Lines changed: 509 additions & 7 deletions

File tree

‎.github/workflows/branch-e2e.yml‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
run_core_e2e: ${{ steps.labels.outputs.run_core_e2e }}
2525
run_gpu_e2e: ${{ steps.labels.outputs.run_gpu_e2e }}
2626
run_kubernetes_ha_e2e: ${{ steps.labels.outputs.run_kubernetes_ha_e2e }}
27+
run_centos_e2e: ${{ steps.labels.outputs.run_centos_e2e }}
2728
run_any_e2e: ${{ steps.labels.outputs.run_any_e2e }}
2829
steps:
2930
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -41,12 +42,14 @@ jobs:
4142
run_core_e2e=true
4243
run_gpu_e2e=true
4344
run_kubernetes_ha_e2e=true
45+
run_centos_e2e=true
4446
else
4547
run_core_e2e="$(jq -r 'index("test:e2e") != null' <<< "$LABELS_JSON")"
4648
run_gpu_e2e="$(jq -r 'index("test:e2e-gpu") != null' <<< "$LABELS_JSON")"
4749
run_kubernetes_ha_e2e="$(jq -r 'index("test:e2e-kubernetes") != null' <<< "$LABELS_JSON")"
50+
run_centos_e2e="$(jq -r 'index("test:e2e-centos") != null' <<< "$LABELS_JSON")"
4851
fi
49-
if [ "$run_core_e2e" = "true" ] || [ "$run_gpu_e2e" = "true" ] || [ "$run_kubernetes_ha_e2e" = "true" ]; then
52+
if [ "$run_core_e2e" = "true" ] || [ "$run_gpu_e2e" = "true" ] || [ "$run_kubernetes_ha_e2e" = "true" ] || [ "$run_centos_e2e" = "true" ]; then
5053
run_any_e2e=true
5154
else
5255
run_any_e2e=false
@@ -55,6 +58,7 @@ jobs:
5558
echo "run_core_e2e=$run_core_e2e"
5659
echo "run_gpu_e2e=$run_gpu_e2e"
5760
echo "run_kubernetes_ha_e2e=$run_kubernetes_ha_e2e"
61+
echo "run_centos_e2e=$run_centos_e2e"
5862
echo "run_any_e2e=$run_any_e2e"
5963
} >> "$GITHUB_OUTPUT"
6064
@@ -145,6 +149,19 @@ jobs:
145149
extra-helm-values: deploy/helm/openshell/ci/values-high-availability.yaml
146150
external-postgres-secret: openshell-ha-pg
147151

152+
centos-selinux-e2e:
153+
needs: [pr_metadata, build-supervisor]
154+
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_centos_e2e == 'true'
155+
# Optional proof-of-life suite (boots a CentOS Stream 10 VM under
156+
# QEMU/KVM on the existing linux-amd64-cpu8 runner). Not part of the
157+
# required E2E gate; see kubernetes-ha-e2e above for the same pattern.
158+
permissions:
159+
contents: read
160+
packages: read
161+
uses: ./.github/workflows/e2e-centos-selinux.yml
162+
with:
163+
image-tag: ${{ github.sha }}
164+
148165
core-e2e-result:
149166
name: Core E2E result
150167
needs: [pr_metadata, build-gateway, build-supervisor, e2e, kubernetes-e2e]

0 commit comments

Comments
 (0)