mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
add build step logging to multi-arch build
With extra logging, there is no need to call `travis_wait` anymore. In addition the `travis_wait` command blocks output, so the build steps are not reported until the script finishes. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
5a4517e38e
commit
99dabca319
@ -84,7 +84,7 @@ jobs:
|
||||
- stage: build testing
|
||||
name: Build multi-architecture image for amd64 and arm64
|
||||
script:
|
||||
- travis_wait ./scripts/build-multi-arch-image.sh || travis_terminate 1;
|
||||
- ./scripts/build-multi-arch-image.sh || travis_terminate 1;
|
||||
|
||||
- stage: build testing
|
||||
name: containerized test (Fedora) and build (CentOS)
|
||||
|
@ -1,4 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=scripts/build_step.inc.sh
|
||||
source "$(dirname "${0}")/build_step.inc.sh"
|
||||
|
||||
set -xe
|
||||
# "docker manifest" requires experimental feature enabled
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
@ -21,6 +25,7 @@ baseimg=$(awk -F = '/^ARG BASE_IMAGE=/ {print $NF}' "${dockerfile}")
|
||||
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 "starting 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
|
||||
@ -29,5 +34,6 @@ for ARCH in amd64 arm64; do
|
||||
digest=$(awk -v ARCH=${ARCH} '{if (archfound) {print $NF; exit 0}}; {archfound=($0 ~ "arch.*"ARCH)}' <<<"${manifests}")
|
||||
IFS=$ifs
|
||||
base_img=${baseimg}@${digest}
|
||||
build_step "make image-cephcsi for ${ARCH}"
|
||||
GOARCH=${ARCH} BASE_IMAGE=${base_img} make image-cephcsi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user