diff --git a/.ci/test-install-docs.sh b/.ci/test-install-docs.sh index 09971bc8a3..fffebac28a 100755 --- a/.ci/test-install-docs.sh +++ b/.ci/test-install-docs.sh @@ -6,12 +6,23 @@ set -e +# The go binary isn't installed, but we checkout the repos to the standard +# golang locations. +export GOPATH=${GOPATH:-${HOME}/go} + info() { local msg="$*" echo "INFO: $msg" } +setup() +{ + source /etc/os-release || source /usr/lib/os-release + + mkdir -p "${GOPATH}" +} + # Run the kata manager to "execute" the install guide to ensure the commands # it specified result in a working system. test_distro_install_guide() @@ -23,8 +34,6 @@ test_distro_install_guide() [ ! -e "$GOPATH" ] && die "cannot find $mgr" - source /etc/os-release - info "Installing system from the $ID install guide" $mgr install-docker-system @@ -95,4 +104,5 @@ check_install_docs() run_tests } +setup check_install_docs