Skip to content

Commit

Permalink
ci: Add scipt to install cri-contaienrd.
Browse files Browse the repository at this point in the history
Install cri-contaienrd for k8s testing.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Apr 3, 2018
1 parent bc20c3d commit 34ad477
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .ci/install_cri_containerd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -o errexit
set -o nounset
set -o pipefail


tmp_dir=$(mktemp -d -t tmp.XXXXXXXXXX)
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

finish() {
rm -rf "$tmp_dir"
}

die() {
echo >&2 -e "\e[1mERROR\e[0m: $*"
exit 1
}

info() {
echo -e "\e[1mINFO\e[0m: $*"
}


trap finish EXIT

source "${script_dir}/lib.sh"
get_cc_versions

#TODO (jcvenega) remove after https://github.com/clearcontainers/runtime/pull/1091 is merged
cri_containerd_version="v1.0.0-rc.0"

info "Get cri containerd sources"
repo="github.com/containerd/cri"
go get -d "$repo" || true
pushd "${GOPATH}/src/${repo}"
git fetch
info "Checkout to ${cri_containerd_version}"
git checkout "${cri_containerd_version}"
info "Installing cri-containerd"
make install.tools
make install.deps
make
sudo -E PATH=$PATH make install
7 changes: 7 additions & 0 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ if [ -n "$PULL_REQUEST_NUMBER" ] || [ -n "$LOCALCI_PR_NUMBER" ]; then
bash -f "${cidir}/run_fetch_branches_tool.sh"
fi

echo "Install go"
#TODO carlos need to build cri-containerd
bash -f ${cidir}/install_go.sh 1.10


echo "Install shim"
bash -f ${cidir}/install_shim.sh
Expand All @@ -64,6 +68,9 @@ bash -f "${cidir}/install_kubernetes.sh"

bash -f "${cidir}/openshift_setup.sh"

echo "Install cri-containerd"
bash -f ${cidir}/install_cri_containerd.sh

echo "Drop caches"
sync
sudo -E PATH=$PATH bash -c "echo 3 > /proc/sys/vm/drop_caches"

0 comments on commit 34ad477

Please sign in to comment.