2018-01-24 14:45:55 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -xeuo pipefail
|
|
|
|
|
2018-02-09 18:31:47 +00:00
|
|
|
DIST=${DIST:=Fedora}
|
2018-02-15 14:17:35 +00:00
|
|
|
CONTAINER_RUNTIME=${CONTAINER_RUNTIME:=docker}
|
2018-01-24 14:45:55 +00:00
|
|
|
IMAGE=fedorapodmanbuild
|
|
|
|
PYTHON=python3
|
|
|
|
if [[ ${DIST} != "Fedora" ]]; then
|
|
|
|
IMAGE=centospodmanbuild
|
|
|
|
PYTHON=python
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Build the test image
|
2018-02-15 14:17:35 +00:00
|
|
|
${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} .
|
2018-01-24 14:45:55 +00:00
|
|
|
|
|
|
|
# Run the tests
|
2018-02-15 14:17:35 +00:00
|
|
|
${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/projectatomic/libpod --workdir /go/src/github.com/projectatomic/libpod -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/projectatomic/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/crio/conmon" -e DIST=$DIST $IMAGE sh .papr.sh
|