-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI integration test with podman (#422)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
- Loading branch information
1 parent
892558b
commit ed0c246
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
cat <<EOF > registries.conf | ||
unqualified-search-registries = ["docker.io", "quay.io", "registry.fedoraproject.org", "registry.access.redhat.com"] | ||
short-name-mode="permissive" | ||
[[registry]] | ||
location="localhost:5000" | ||
insecure=true | ||
EOF | ||
|
||
CONTAINERS_REGISTRIES_CONF="$(pwd)/registries.conf" | ||
export CONTAINERS_REGISTRIES_CONF | ||
|
||
podman system service --time=0 --log-level=info > podman_log.txt 2>&1 & | ||
podman_pid=$! | ||
|
||
DOCKER_HOST="unix://$(podman info -f '{{.Host.RemoteSocket.Path}}' 2> /dev/null)" | ||
export DOCKER_HOST | ||
go test -tags integration ./... -v | ||
e=$? | ||
|
||
kill -TERM "$podman_pid" > /dev/null 2>&1 | ||
wait "$podman_pid" > /dev/null 2>&1 | ||
|
||
echo '::group::Podman Output' | ||
cat podman_log.txt | ||
echo '' | ||
echo '::endgroup::' | ||
|
||
exit $e |