mirror of https://github.com/knative/func.git
CI integration test with podman (#422)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
892558bf2a
commit
ed0c246ada
|
@ -78,6 +78,15 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
|
- name: Install Podman
|
||||||
|
run: |
|
||||||
|
. /etc/os-release
|
||||||
|
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
||||||
|
curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add -
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y upgrade
|
||||||
|
sudo apt-get -y install podman
|
||||||
|
podman info
|
||||||
- name: Install Binaries
|
- name: Install Binaries
|
||||||
run: ./hack/binaries.sh
|
run: ./hack/binaries.sh
|
||||||
- name: Allocate Cluster
|
- name: Allocate Cluster
|
||||||
|
@ -86,6 +95,8 @@ jobs:
|
||||||
run: ./hack/ci.sh
|
run: ./hack/ci.sh
|
||||||
- name: Verify Configuration
|
- name: Verify Configuration
|
||||||
run: ./hack/test.sh
|
run: ./hack/test.sh
|
||||||
|
- name: Integration Test Podman
|
||||||
|
run: ./hack/test-integration-podman.sh
|
||||||
- name: Integration Test
|
- name: Integration Test
|
||||||
run: make test-integration
|
run: make test-integration
|
||||||
|
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue