From 20801d6563089e4fd7a0604dbb4f717ee7658c9b Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 24 Apr 2020 09:56:24 +0200 Subject: [PATCH] deploy: log steps while tasks are running By repeated logging of the current step, Travis CI should receive some terminal activity and is expected to not timeout anymore. Fixes: #982 Signed-off-by: Niels de Vos --- deploy.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deploy.sh b/deploy.sh index 49bf129e4..9ff0badd2 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,8 @@ #!/bin/bash +# shellcheck source=scripts/build_step.inc.sh +source "$(dirname "${0}")/scripts/build_step.inc.sh" + push_helm_charts() { PACKAGE=$1 VERSION=${ENV_CSI_IMAGE_VERSION//v/} # Set version (without v prefix) @@ -60,6 +63,7 @@ build_push_images() { manifests=$(docker manifest inspect "${baseimg}" | jq '.manifests[] | {arch: .platform.architecture, digest: .digest}') # qemu-user-static is to enable an execution of different multi-architecture containers by QEMU # more info at https://github.com/multiarch/qemu-user-static + build_step "docker run multiarch/qemu-user-static container" docker run --rm --privileged multiarch/qemu-user-static --reset -p yes # build and push per arch images for ARCH in amd64 arm64; do @@ -68,7 +72,9 @@ build_push_images() { digest=$(awk -v ARCH=${ARCH} '{if (archfound) {print $NF; exit 0}}; {archfound=($0 ~ "arch.*"ARCH)}' <<<"${manifests}") IFS=$ifs base_image=${baseimg}@${digest} + build_step "make push-image-cephcsi for ${ARCH}" GOARCH=${ARCH} BASE_IMAGE=${base_image} make push-image-cephcsi + build_step_log "done: make push-image-cephcsi for ${ARCH} (ret=${?})" done } @@ -80,6 +86,7 @@ else fi if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + build_step "log in to quay.io as user ${QUAY_IO_USERNAME}" "${CONTAINER_CMD:-docker}" login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io set -xe @@ -89,15 +96,20 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then mkdir -p tmp pushd tmp >/dev/null + build_step "installing helm" curl https://raw.githubusercontent.com/helm/helm/master/scripts/get >get_helm.sh chmod 700 get_helm.sh ./get_helm.sh + build_step "cloning ceph/csi-charts repository" git clone https://github.com/ceph/csi-charts mkdir -p csi-charts/docs popd >/dev/null + build_step "pushing RBD helm charts" push_helm_charts rbd + build_step "pushing CephFS helm charts" push_helm_charts cephfs + build_step_log "finished deployment!" fi