mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-30 10:10:21 +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>
(cherry picked from commit 20801d6563
)
This commit is contained in:
parent
0d12fb6a4e
commit
b615e2b61f
12
deploy.sh
12
deploy.sh
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck source=scripts/build_step.inc.sh
|
||||||
|
source "$(dirname "${0}")/scripts/build_step.inc.sh"
|
||||||
|
|
||||||
push_helm_charts() {
|
push_helm_charts() {
|
||||||
PACKAGE=$1
|
PACKAGE=$1
|
||||||
VERSION=${ENV_CSI_IMAGE_VERSION//v/} # Set version (without v prefix)
|
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}')
|
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
|
# 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
|
# 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
|
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||||
# build and push per arch images
|
# build and push per arch images
|
||||||
for ARCH in amd64 arm64; do
|
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}")
|
digest=$(awk -v ARCH=${ARCH} '{if (archfound) {print $NF; exit 0}}; {archfound=($0 ~ "arch.*"ARCH)}' <<<"${manifests}")
|
||||||
IFS=$ifs
|
IFS=$ifs
|
||||||
base_image=${baseimg}@${digest}
|
base_image=${baseimg}@${digest}
|
||||||
|
build_step "make push-image-cephcsi for ${ARCH}"
|
||||||
GOARCH=${ARCH} BASE_IMAGE=${base_image} make push-image-cephcsi
|
GOARCH=${ARCH} BASE_IMAGE=${base_image} make push-image-cephcsi
|
||||||
|
build_step_log "done: make push-image-cephcsi for ${ARCH} (ret=${?})"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +86,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
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
|
"${CONTAINER_CMD:-docker}" login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io
|
||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
@ -89,15 +96,20 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
|||||||
mkdir -p tmp
|
mkdir -p tmp
|
||||||
pushd tmp >/dev/null
|
pushd tmp >/dev/null
|
||||||
|
|
||||||
|
build_step "installing helm"
|
||||||
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get >get_helm.sh
|
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get >get_helm.sh
|
||||||
chmod 700 get_helm.sh
|
chmod 700 get_helm.sh
|
||||||
./get_helm.sh
|
./get_helm.sh
|
||||||
|
|
||||||
|
build_step "cloning ceph/csi-charts repository"
|
||||||
git clone https://github.com/ceph/csi-charts
|
git clone https://github.com/ceph/csi-charts
|
||||||
|
|
||||||
mkdir -p csi-charts/docs
|
mkdir -p csi-charts/docs
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
|
||||||
|
build_step "pushing RBD helm charts"
|
||||||
push_helm_charts rbd
|
push_helm_charts rbd
|
||||||
|
build_step "pushing CephFS helm charts"
|
||||||
push_helm_charts cephfs
|
push_helm_charts cephfs
|
||||||
|
build_step_log "finished deployment!"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user