*: fix crictl vendor
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
a38419af88
commit
59ba89d64d
3 changed files with 26 additions and 25 deletions
|
@ -77,7 +77,7 @@ RUN set -x \
|
||||||
&& rm -rf "$GOPATH"
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Install crictl
|
# Install crictl
|
||||||
ENV CRICTL_COMMIT a2d0e8f7bc7e80111a7d79052ab9aca3469609aa
|
ENV CRICTL_COMMIT 16e6fe4d7199c5689db4630a9330e6a8a12cecd1
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOPATH="$(mktemp -d)" \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& git clone https://github.com/kubernetes-incubator/cri-tools.git "$GOPATH/src/github.com/kubernetes-incubator/cri-tools" \
|
&& git clone https://github.com/kubernetes-incubator/cri-tools.git "$GOPATH/src/github.com/kubernetes-incubator/cri-tools" \
|
||||||
|
|
|
@ -131,6 +131,7 @@
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/kubernetes-incubator/cri-tools
|
repo: https://github.com/kubernetes-incubator/cri-tools
|
||||||
dest: /root/src/github.com/kubernetes-incubator/cri-tools
|
dest: /root/src/github.com/kubernetes-incubator/cri-tools
|
||||||
|
version: 16e6fe4d7199c5689db4630a9330e6a8a12cecd1
|
||||||
async: 600
|
async: 600
|
||||||
poll: 10
|
poll: 10
|
||||||
- name: git clone runc repo
|
- name: git clone runc repo
|
||||||
|
|
|
@ -236,14 +236,14 @@ function start_crio() {
|
||||||
"$CRIO_BINARY" --debug --config "$CRIO_CONFIG" & CRIO_PID=$!
|
"$CRIO_BINARY" --debug --config "$CRIO_CONFIG" & CRIO_PID=$!
|
||||||
wait_until_reachable
|
wait_until_reachable
|
||||||
|
|
||||||
run crictl image status redis:alpine
|
run crictl inspecti redis:alpine
|
||||||
if [ "$status" -ne 0 ] ; then
|
if [ "$status" -ne 0 ] ; then
|
||||||
crictl image pull redis:alpine
|
crictl pull redis:alpine
|
||||||
fi
|
fi
|
||||||
REDIS_IMAGEID=$(crictl image status redis:alpine | head -1 | sed -e "s/ID: //g")
|
REDIS_IMAGEID=$(crictl inspecti redis:alpine | head -1 | sed -e "s/ID: //g")
|
||||||
run crictl image status mrunalp/oom
|
run crictl inspecti mrunalp/oom
|
||||||
if [ "$status" -ne 0 ] ; then
|
if [ "$status" -ne 0 ] ; then
|
||||||
crictl image pull mrunalp/oom
|
crictl pull mrunalp/oom
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -256,63 +256,63 @@ function start_crio() {
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
REDIS_IMAGEID_DIGESTED="redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b"
|
REDIS_IMAGEID_DIGESTED="redis@sha256:03789f402b2ecfb98184bf128d180f398f81c63364948ff1454583b02442f73b"
|
||||||
run crictl image status $REDIS_IMAGEID_DIGESTED
|
run crictl inspecti $REDIS_IMAGEID_DIGESTED
|
||||||
if [ "$status" -ne 0 ]; then
|
if [ "$status" -ne 0 ]; then
|
||||||
crictl image pull $REDIS_IMAGEID_DIGESTED
|
crictl pull $REDIS_IMAGEID_DIGESTED
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
run crictl image status runcom/stderr-test
|
run crictl inspecti runcom/stderr-test
|
||||||
if [ "$status" -ne 0 ] ; then
|
if [ "$status" -ne 0 ] ; then
|
||||||
crictl image pull runcom/stderr-test:latest
|
crictl pull runcom/stderr-test:latest
|
||||||
fi
|
fi
|
||||||
STDERR_IMAGEID=$(crictl image status runcom/stderr-test | head -1 | sed -e "s/ID: //g")
|
STDERR_IMAGEID=$(crictl inspecti runcom/stderr-test | head -1 | sed -e "s/ID: //g")
|
||||||
run crictl image status busybox
|
run crictl inspecti busybox
|
||||||
if [ "$status" -ne 0 ] ; then
|
if [ "$status" -ne 0 ] ; then
|
||||||
crictl image pull busybox:latest
|
crictl pull busybox:latest
|
||||||
fi
|
fi
|
||||||
BUSYBOX_IMAGEID=$(crictl image status busybox | head -1 | sed -e "s/ID: //g")
|
BUSYBOX_IMAGEID=$(crictl inspecti busybox | head -1 | sed -e "s/ID: //g")
|
||||||
run crictl image status mrunalp/image-volume-test
|
run crictl inspecti mrunalp/image-volume-test
|
||||||
if [ "$status" -ne 0 ] ; then
|
if [ "$status" -ne 0 ] ; then
|
||||||
crictl image pull mrunalp/image-volume-test:latest
|
crictl pull mrunalp/image-volume-test:latest
|
||||||
fi
|
fi
|
||||||
VOLUME_IMAGEID=$(crictl image status mrunalp/image-volume-test | head -1 | sed -e "s/ID: //g")
|
VOLUME_IMAGEID=$(crictl inspecti mrunalp/image-volume-test | head -1 | sed -e "s/ID: //g")
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_ctrs() {
|
function cleanup_ctrs() {
|
||||||
run crictl ctr ls --quiet
|
run crictl ps --quiet
|
||||||
if [ "$status" -eq 0 ]; then
|
if [ "$status" -eq 0 ]; then
|
||||||
if [ "$output" != "" ]; then
|
if [ "$output" != "" ]; then
|
||||||
printf '%s\n' "$output" | while IFS= read -r line
|
printf '%s\n' "$output" | while IFS= read -r line
|
||||||
do
|
do
|
||||||
crictl ctr stop "$line"
|
crictl stop "$line"
|
||||||
crictl ctr rm "$line"
|
crictl rm "$line"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_images() {
|
function cleanup_images() {
|
||||||
run crictl image ls --quiet
|
run crictl images --quiet
|
||||||
if [ "$status" -eq 0 ]; then
|
if [ "$status" -eq 0 ]; then
|
||||||
if [ "$output" != "" ]; then
|
if [ "$output" != "" ]; then
|
||||||
printf '%s\n' "$output" | while IFS= read -r line
|
printf '%s\n' "$output" | while IFS= read -r line
|
||||||
do
|
do
|
||||||
crictl image rm "$line"
|
crictl rmi "$line"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanup_pods() {
|
function cleanup_pods() {
|
||||||
run crictl sandbox ls --quiet
|
run crictl sandboxes --quiet
|
||||||
if [ "$status" -eq 0 ]; then
|
if [ "$status" -eq 0 ]; then
|
||||||
if [ "$output" != "" ]; then
|
if [ "$output" != "" ]; then
|
||||||
printf '%s\n' "$output" | while IFS= read -r line
|
printf '%s\n' "$output" | while IFS= read -r line
|
||||||
do
|
do
|
||||||
crictl sandbox stop "$line"
|
crictl stops "$line"
|
||||||
crictl sandbox rm "$line"
|
crictl rms "$line"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue