Run CI Against Podman #600
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The existing
podman-rspec
job in theunit_test.yaml
workflow only installed Podman, but never started the engine. As a result the tets still talked to the pre-installed Docker daemon on/var/run/docker.sock
, since that's what it defaults to.Docker.podman?
never returnedtrue
and we were silently re-running the test suite with Docker.https://github.com/actions/runner-images/blob/27d8a9d9026ab6e207340dde6e14f4faf3864e29/images/ubuntu/scripts/build/install-docker.sh#L60-L61
You can see that in the
podman-rspec
test runs, there are no specs skipped due toskip('Not supported on podman') if ::Docker.podman?
, meaning we're not using Podman.Proposed solution
1. Start a real Podman API service
podman system service unix://…
is launched in the runner’s home directory and kept alive for the whole job.2. Point the test suite at that socket
We export
DOCKER_HOST
so the gem connects to Podman, and set anEXPECT_PODMAN
flag.3. Fail fast if mis-configured
A guard in
spec_helper.rb
hard-exits whenEXPECT_PODMAN=true
butDocker.podman?
is stillfalse
.4. Remove Podman installation (Maybe?)
Podman is already pre-installed on GitHub Ubuntu runners so the custom install script is no longer called. But, perhaps it's better to keep it to ensure it's always available.
Additional notes
EXPECT_PODMAN=true
.