From 6f41be3b4725f58b79f5bfd09b31c0738fafb159 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Fri, 1 Jan 2021 20:40:32 -0800 Subject: [PATCH 1/2] Use consistent mono image for Docker and Travis tests. Previously, Travis used the latest mono image. By using the same one as the Docker image, we would have caught the problem in issue #4403 before the changes were merged into the master branch. --- Installer/Docker/build-images.sh | 1 + Installer/Docker/context/Dockerfile | 3 ++- Installer/Docker/mono_image.txt | 1 + pipeline/shared/duplicati.sh | 2 +- pipeline/stage_build/trigger.sh | 5 +++-- pipeline/stage_unittests/trigger.sh | 5 +++-- 6 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 Installer/Docker/mono_image.txt diff --git a/Installer/Docker/build-images.sh b/Installer/Docker/build-images.sh index 13cc5b18a3..68143999a3 100755 --- a/Installer/Docker/build-images.sh +++ b/Installer/Docker/build-images.sh @@ -55,6 +55,7 @@ docker buildx create --use --name duplicati-multiarch docker buildx build \ ${args} \ --platform ${PLATFORMS} \ + --build-arg PARENT_IMAGE="$(cat mono_image.txt)-slim" \ --build-arg VERSION=${VERSION} \ --build-arg CHANNEL=${CHANNEL} \ --file context/Dockerfile \ diff --git a/Installer/Docker/context/Dockerfile b/Installer/Docker/context/Dockerfile index ffcd6e3cc2..cc4c1ca62c 100644 --- a/Installer/Docker/context/Dockerfile +++ b/Installer/Docker/context/Dockerfile @@ -1,4 +1,5 @@ -FROM --platform=$TARGETPLATFORM mono:5-slim +ARG PARENT_IMAGE +FROM --platform=$TARGETPLATFORM ${PARENT_IMAGE} RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/Installer/Docker/mono_image.txt b/Installer/Docker/mono_image.txt new file mode 100644 index 0000000000..b20beab1fb --- /dev/null +++ b/Installer/Docker/mono_image.txt @@ -0,0 +1 @@ +mono:5 diff --git a/pipeline/shared/duplicati.sh b/pipeline/shared/duplicati.sh index c58546e3cc..720a37af5d 100644 --- a/pipeline/shared/duplicati.sh +++ b/pipeline/shared/duplicati.sh @@ -6,4 +6,4 @@ declare -a FORWARD_OPTS export UPDATE_SOURCE="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_source" export UPDATE_TARGET="${DUPLICATI_ROOT}/Updates/build/${BUILDTAG}_target" - +export MONO_IMAGE="$(cat "${TRAVIS_BUILD_DIR}/Installer/Docker/mono_image.txt")" diff --git a/pipeline/stage_build/trigger.sh b/pipeline/stage_build/trigger.sh index c583ffc8b8..71dc7593df 100755 --- a/pipeline/stage_build/trigger.sh +++ b/pipeline/stage_build/trigger.sh @@ -1,7 +1,8 @@ #!/bin/bash . error_handling.sh +. ./pipeline/shared/duplicati.sh PACKAGES="libgtk2.0-cil rsync" -docker-run --image mono \ +docker-run --image "${MONO_IMAGE}" \ --packages "$PACKAGES" \ ---command "/pipeline/stage_build/job.sh" $@ \ No newline at end of file +--command "/pipeline/stage_build/job.sh" $@ diff --git a/pipeline/stage_unittests/trigger.sh b/pipeline/stage_unittests/trigger.sh index 4d493175a1..4d3e414443 100755 --- a/pipeline/stage_unittests/trigger.sh +++ b/pipeline/stage_unittests/trigger.sh @@ -1,7 +1,8 @@ #!/bin/bash . error_handling.sh +. ./pipeline/shared/duplicati.sh PACKAGES="wget unzip rsync" -docker-run --image mono \ +docker-run --image "${MONO_IMAGE}" \ --packages "$PACKAGES" \ ---command "/pipeline/stage_unittests/job.sh" $@ \ No newline at end of file +--command "/pipeline/stage_unittests/job.sh" $@ From 529e4c7ce516635a0150e9fca3ef24c862d174b7 Mon Sep 17 00:00:00 2001 From: Kenneth Hsu Date: Sat, 2 Jan 2021 12:49:40 -0800 Subject: [PATCH 2/2] Update Docker parent image to mono:6. --- Installer/Docker/mono_image.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installer/Docker/mono_image.txt b/Installer/Docker/mono_image.txt index b20beab1fb..62ea9e2abd 100644 --- a/Installer/Docker/mono_image.txt +++ b/Installer/Docker/mono_image.txt @@ -1 +1 @@ -mono:5 +mono:6