From e4077e915b426185a6906f6509cc585be6783867 Mon Sep 17 00:00:00 2001 From: Abhinandan Prativadi Date: Sun, 17 Sep 2017 11:29:59 -0700 Subject: [PATCH] Add crictl cli to install deps Signed-off-by: Abhinandan Prativadi --- hack/install-deps.sh | 7 ++++++- hack/release.sh | 2 ++ hack/test-cri.sh | 10 +++++----- hack/versions | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hack/install-deps.sh b/hack/install-deps.sh index 8746755d3..c3032717c 100755 --- a/hack/install-deps.sh +++ b/hack/install-deps.sh @@ -52,7 +52,7 @@ CNI_CONFIG_DIR=${DESTDIR}/etc/cni/net.d RUNC_PKG=github.com/opencontainers/runc CNI_PKG=github.com/containernetworking/plugins CONTAINERD_PKG=github.com/containerd/containerd - +CRITOOL_PKG=github.com/kubernetes-incubator/cri-tools # Check GOPATH if [[ -z "${GOPATH}" ]]; then echo "GOPATH is not set" @@ -125,3 +125,8 @@ checkout_repo ${CONTAINERD_PKG} ${CONTAINERD_VERSION} cd ${GOPATH}/src/${CONTAINERD_PKG} make ${sudo} make install -e DESTDIR=${CONTAINERD_DIR} + +#Install crictl +checkout_repo ${CRITOOL_PKG} ${CRITOOL_VERSION} +cd ${GOPATH}/src/${CRITOOL_PKG} +make diff --git a/hack/release.sh b/hack/release.sh index 13e3c1834..aea03c7b4 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -34,6 +34,8 @@ NOSUDO=true DESTDIR=${destdir} ./hack/install-deps.sh # Install cri-containerd into release stage. make install -e DESTDIR=${destdir} +# Copy crictl tool into release stage +cp ${GOPATH}/bin/crictl ${destdir}/usr/local/bin/ # Install systemd units into release stage. mkdir -p ${destdir}/etc/systemd/system cp ${ROOT}/contrib/systemd-units/* ${destdir}/etc/systemd/system/ diff --git a/hack/test-cri.sh b/hack/test-cri.sh index 387b03cc8..88ed27a74 100755 --- a/hack/test-cri.sh +++ b/hack/test-cri.sh @@ -21,7 +21,7 @@ source $(dirname "${BASH_SOURCE[0]}")/test-utils.sh # FOCUS focuses the test to run. FOCUS=${FOCUS:-} # SKIP skips the test to skip. -SKIP=${SKIP:-""} +SKIP=${SKIP:-"SeccompProfilePath"} REPORT_DIR=${REPORT_DIR:-"/tmp/test-cri"} # Check GOPATH @@ -34,15 +34,15 @@ fi GOPATH=${GOPATH%%:*} CRITEST=${GOPATH}/bin/critest -CRITEST_PKG=github.com/kubernetes-incubator/cri-tools +CRITOOL_PKG=github.com/kubernetes-incubator/cri-tools CRICONTAINERD_SOCK=/var/run/cri-containerd.sock # Install critest if [ ! -x "$(command -v ${CRITEST})" ]; then - go get -d ${CRITEST_PKG}/... - cd ${GOPATH}/src/${CRITEST_PKG} + go get -d ${CRITOOL_PKG}/... + cd ${GOPATH}/src/${CRITOOL_PKG} git fetch --all - git checkout ${CRITEST_VERSION} + git checkout ${CRITOOL_VERSION} make fi which ${CRITEST} diff --git a/hack/versions b/hack/versions index c6c40d165..110c9cd06 100644 --- a/hack/versions +++ b/hack/versions @@ -1,5 +1,5 @@ RUNC_VERSION=593914b8bd5448a93f7c3e4902a03408b6d5c0ce CNI_VERSION=v0.6.0 CONTAINERD_VERSION=0cb2c961b2d41e46fbb94bfa165db6d6731b73d2 -CRITEST_VERSION=3028b837818133b4e83758cf9aee867f0a3ff6d2 +CRITOOL_VERSION=046c028a5551b4c5d2a2e503eabeb238ccafe307 KUBERNETES_VERSION=11a836078d0c78a4253a77a3ff6f4a555c4121f9