summaryrefslogtreecommitdiff
path: root/.gitlab-ci
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2021-06-11 15:50:15 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2021-06-15 14:02:44 +0200
commit525a21d0ff4bbdbed567ad730f977b6e638329d6 (patch)
tree845d55786e0796210e65cea49d0051e19f09a7a8 /.gitlab-ci
parent62de8f913aff1a60b56fe663f561eb7ca7d9a9ab (diff)
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 <daniels@collabora.com> Acked-by: Martin Peres <martin.peres@mupuf.org> Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11337>
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x.gitlab-ci/bare-metal/init.sh14
1 files changed, 8 insertions, 6 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
+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
-echo "nameserver 8.8.8.8" > /etc/resolv.conf
-
-# 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
-
# Start a little daemon to capture the first devcoredump we encounter. (They
# expire after 5 minutes, so we poll for them).
./capture-devcoredump.sh &