Debian Codegraph @

.gitlab-ci/bare-metal/rootfs-setup.sh

raw
1 #!/usr/bin/env bash
2 # shellcheck disable=SC2086 # we want word splitting
3
4 rootfs_dst=$1
5
6 mkdir -p $rootfs_dst/results
7
8 # Set up the init script that brings up the system.
9 cp $BM/bm-init.sh $rootfs_dst/init
10 cp $CI_COMMON/init*.sh $rootfs_dst/
11
12 date +'%F %T'
13
14 # Make JWT token available as file in the bare-metal storage to enable access
15 # to MinIO
16 cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}"
17
18 date +'%F %T'
19
20 cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/"
21
22 set +x
23
24 # Pass through relevant env vars from the gitlab job to the baremetal init script
25 echo "Variables passed through:"
26 filter_env_vars | tee $rootfs_dst/set-job-env-vars.sh
27
28 set -x
29
30 # Add the Mesa drivers we built, and make a consistent symlink to them.
31 mkdir -p $rootfs_dst/$CI_PROJECT_DIR
32 rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
33
34 date +'%F %T'