Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion validate-microshift/cluster-debug-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ done

TO_DESCRIBE=(deployments daemonsets statefulsets replicasets)
for ns in $(kubectl get namespace -o jsonpath='{.items..metadata.name}'); do
oc get namespace $ns -o yaml
to_run oc get namespace $ns -o yaml

for resource_type in ${TO_DESCRIBE[*]}; do
for resource in $(kubectl get $resource_type -n $ns -o name); do
Expand Down
39 changes: 34 additions & 5 deletions validate-microshift/kuttl-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,43 @@ set -x

ROOT="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")/../")"

KUTTL_VERSION="0.10.0"
KUTTL_VERSION="0.15.0"
KUTTL="$ROOT/bin/kuttl"

unamep=$(uname -p)
case ${unamep} in
"x86_64")
ARCH=x86_64
;;
"aarch64")
ARCH=arm64
;;
*)
echo >&2 "Unknown architecture: ${unamep}"
exit 1
;;
esac

fetch_kuttl() {
for try in $(seq 1 5); do
if curl -sSLo $KUTTL "https://github.com/kudobuilder/kuttl/releases/download/v${KUTTL_VERSION}/kubectl-kuttl_${KUTTL_VERSION}_linux_${ARCH}"; then
chmod a+x $KUTTL
return 0
fi

sleep 5s
done

echo >&2 "Failed to fetch kuttl"
exit 1
}

mkdir -p "$(dirname "$KUTTL")"
! [ -e $KUTTL ] && curl -sSLo $KUTTL https://github.com/kudobuilder/kuttl/releases/download/v"${KUTTL_VERSION}"/kubectl-kuttl_"${KUTTL_VERSION}"_linux_x86_64 && \
chmod a+x $KUTTL
if [ ! -e "$KUTTL" ]; then
fetch_kuttl
fi

$KUTTL test --namespace test || {
./cluster-debug-info.sh
exit 1
${ROOT}/validate-microshift/cluster-debug-info.sh
exit 1
}