Skip to content

Commit

Permalink
Merge pull request #2226 from Starnop/ci-ali-cri-tools
Browse files Browse the repository at this point in the history
test: replace k8s-sigs/cri-tools with alibaba/cri-tools
  • Loading branch information
allencloud authored Sep 17, 2018
2 parents 1596dd7 + 8ce544b commit b926849
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 17 additions & 5 deletions hack/install/install_critest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -euo pipefail

CRITEST_VERSION=1.0.0-beta.0
CRITEST_BRANCH=tools-dev

# keep the first one only
GOPATH="${GOPATH%%:*}"
Expand Down Expand Up @@ -31,15 +32,26 @@ critest::check_version() {

# critest::install downloads the package and build.
critest::install() {
local workdir pkg
local workdir pkg cri_runtime CRITOOLS_REPO
cri_runtime=$1

pkg="github.com/kubernetes-incubator/cri-tools"
pkg="github.com/kubernetes-sigs/cri-tools"
CRITOOLS_REPO="github.com/alibaba/cri-tools"
workdir="${GOPATH}/src/${pkg}"

go get -d "${pkg}"/...
if [ ! -d "${workdir}" ]; then
mkdir -p "${workdir}"
cd "${workdir}"
git clone https://${CRITOOLS_REPO} .
fi

cd "${workdir}"
git fetch --all
git checkout "v${CRITEST_VERSION}"
if [[ "${cri_runtime}" == "v1alpha1" ]]; then
git checkout "v${CRITEST_VERSION}"
else
git checkout "${CRITEST_BRANCH}"
fi
make
cd -
}
Expand Down Expand Up @@ -68,7 +80,7 @@ main() {
fi

echo ">>>> install critest-${CRITEST_VERSION} <<<<"
critest::install
critest::install "${cri_runtime}"

command -v critest > /dev/null
}
Expand Down
2 changes: 2 additions & 0 deletions hack/testing/run_daemon_cri_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export PATH="${GOPATH}/bin:${PATH}"
DEFAULT_CRI_SKIP="RunAsUserName|seccomp localhost"
DEFAULT_CRI_SKIP="${DEFAULT_CRI_SKIP}|should error on create with wrong options"
DEFAULT_CRI_SKIP="${DEFAULT_CRI_SKIP}|runtime should support reopening container log"
DEFAULT_CRI_SKIP="${DEFAULT_CRI_SKIP}|runtime should support RunAsGroup"
DEFAULT_CRI_SKIP="${DEFAULT_CRI_SKIP}|runtime should return error if RunAsGroup is set without RunAsUser"
CRI_SKIP="${CRI_SKIP:-"${DEFAULT_CRI_SKIP}"}"

# CRI_FOCUS focuses the test to run.
Expand Down

0 comments on commit b926849

Please sign in to comment.