Files
kata-containers/.ci/lib.sh
James O. D. Hunt 1c488951e0 CI: Enable checkcommits
Run the central static check script to enable `checkcommits`.

Fixes #8.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-01-31 12:30:02 +00:00

26 lines
487 B
Bash

#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
export tests_repo="github.com/kata-containers/tests"
export tests_repo_dir="$GOPATH/src/$tests_repo"
clone_tests_repo()
{
# KATA_CI_NO_NETWORK is (has to be) ignored if there is
# no existing clone.
if [ -d "$tests_repo_dir" -a -n "$KATA_CI_NO_NETWORK" ]
then
return
fi
go get -d -u "$tests_repo" || true
}
run_static_checks()
{
clone_tests_repo
bash "$tests_repo_dir/.ci/static-checks.sh"
}