mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 15:57:09 +00:00
Merge pull request #1637 from wainersm/openshift_ci_centos8
ci/openshift-ci: Prepare to build on CentOS 8
This commit is contained in:
commit
d2fda148fa
23
ci/lib.sh
23
ci/lib.sh
@ -7,16 +7,25 @@ export tests_repo="${tests_repo:-github.com/kata-containers/tests}"
|
|||||||
export tests_repo_dir="$GOPATH/src/$tests_repo"
|
export tests_repo_dir="$GOPATH/src/$tests_repo"
|
||||||
export branch="${branch:-main}"
|
export branch="${branch:-main}"
|
||||||
|
|
||||||
|
# Clones the tests repository and checkout to the branch pointed out by
|
||||||
|
# the global $branch variable.
|
||||||
|
# If the clone exists and `CI` is exported then it does nothing. Otherwise
|
||||||
|
# it will clone the repository or `git pull` the latest code.
|
||||||
|
#
|
||||||
clone_tests_repo()
|
clone_tests_repo()
|
||||||
{
|
{
|
||||||
if [ -d "$tests_repo_dir" -a -n "$CI" ]
|
if [ -d "$tests_repo_dir" ]; then
|
||||||
then
|
[ -n "$CI" ] && return
|
||||||
return
|
pushd "${tests_repo_dir}"
|
||||||
|
git checkout "${branch}"
|
||||||
|
git pull
|
||||||
|
popd
|
||||||
|
else
|
||||||
|
git clone -q "https://${tests_repo}" "$tests_repo_dir"
|
||||||
|
pushd "${tests_repo_dir}"
|
||||||
|
git checkout "${branch}"
|
||||||
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
go get -d -u "$tests_repo" || true
|
|
||||||
|
|
||||||
pushd "${tests_repo_dir}" && git checkout "${branch}" && popd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run_static_checks()
|
run_static_checks()
|
||||||
|
9
ci/openshift-ci/images/Dockerfile.buildroot
Normal file
9
ci/openshift-ci/images/Dockerfile.buildroot
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Copyright (c) 2021 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
# This is the build root image for Kata Containers on OpenShift CI.
|
||||||
|
#
|
||||||
|
FROM centos:8
|
||||||
|
|
||||||
|
RUN yum -y update && yum -y install git sudo wget
|
Loading…
Reference in New Issue
Block a user