mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
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 <ndevos@redhat.com>
This commit is contained in:
parent
fd62a5897a
commit
20801d6563
12
deploy.sh
12
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
|
||||
|
Loading…
Reference in New Issue
Block a user