mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 16:57:18 +00:00
CI: Add CI scripts
Create a basic set of CI scripts that just run the static checks for now. Fixes #101. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
1ca427d2ea
commit
811a5437a4
25
.ci/lib.sh
Normal file
25
.ci/lib.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2018 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export tests_repo="${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"
|
||||||
|
}
|
11
.ci/run.sh
Executable file
11
.ci/run.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cidir=$(dirname "$0")
|
||||||
|
bash "${cidir}/static-checks.sh"
|
12
.ci/static-checks.sh
Executable file
12
.ci/static-checks.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cidir=$(dirname "$0")
|
||||||
|
source "${cidir}/lib.sh"
|
||||||
|
|
||||||
|
run_static_checks
|
12
.travis.yml
Normal file
12
.travis.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2018 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
language: bash
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ".ci/run.sh"
|
Loading…
Reference in New Issue
Block a user