From 525a21d0ff4bbdbed567ad730f977b6e638329d6 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 11 Jun 2021 15:50:15 +0100 Subject: [PATCH] ci/bare-metal: Reorder init so network comes first Make sure that everything we need to ensure network access comes first, so we can reuse this in LAVA which needs the network to pull the per-pipeline build and the per-job environment overlays. Signed-off-by: Daniel Stone Acked-by: Martin Peres Acked-by: Emma Anholt Reviewed-by: Tomeu Vizoso Part-of: --- .gitlab-ci/bare-metal/init.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci/bare-metal/init.sh b/.gitlab-ci/bare-metal/init.sh index 50d17302951..3c59de7c195 100755 --- a/.gitlab-ci/bare-metal/init.sh +++ b/.gitlab-ci/bare-metal/init.sh @@ -9,19 +9,21 @@ mkdir -p /dev/pts mount -t devpts devpts /dev/pts mount -t tmpfs tmpfs /tmp -. /set-job-env-vars.sh - -[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe) - -# Store Mesa's disk cache under /tmp, rather than sending it out over NFS. -export XDG_CACHE_HOME=/tmp - echo "nameserver 8.8.8.8" > /etc/resolv.conf +[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts # Set the time so we can validate certificates before we fetch anything; # however as not all DUTs have network, make this non-fatal. for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true +. /set-job-env-vars.sh + +# Set up any devices required by the jobs +[ -z "$HWCI_KERNEL_MODULES" ] || (echo -n $HWCI_KERNEL_MODULES | xargs -d, -n1 /usr/sbin/modprobe) + +# Store Mesa's disk cache under /tmp, rather than sending it out over NFS. +export XDG_CACHE_HOME=/tmp + # Start a little daemon to capture the first devcoredump we encounter. (They # expire after 5 minutes, so we poll for them). ./capture-devcoredump.sh &