mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-25 19:21:53 +00:00
CI: Add CI scripts
Add a basic set of CI scripts to ensure doc PRs are checked. Fixes: #112. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
d45df3fae1
commit
f11c7bb05f
25
.ci/lib.sh
Normal file
25
.ci/lib.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2019 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" "github.com/kata-containers/community"
|
||||||
|
}
|
11
.ci/run.sh
Executable file
11
.ci/run.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# No explicit tests currently
|
||||||
|
true
|
17
.ci/setup.sh
Executable file
17
.ci/setup.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cidir=$(dirname "$0")
|
||||||
|
source "${cidir}/lib.sh"
|
||||||
|
|
||||||
|
clone_tests_repo
|
||||||
|
|
||||||
|
pushd "${tests_repo_dir}"
|
||||||
|
.ci/setup.sh
|
||||||
|
popd
|
12
.ci/static-checks.sh
Executable file
12
.ci/static-checks.sh
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cidir=$(dirname "$0")
|
||||||
|
source "${cidir}/lib.sh"
|
||||||
|
|
||||||
|
run_static_checks
|
21
.travis.yml
Normal file
21
.travis.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- master
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- ".ci/setup.sh"
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- ".ci/static-checks.sh"
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ".ci/run.sh"
|
Loading…
Reference in New Issue
Block a user