2020-05-15 17:57:25 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
rootfs_dst=$1
|
|
|
|
|
2020-06-03 00:14:36 +01:00
|
|
|
mkdir -p $rootfs_dst/results
|
2020-05-15 17:57:25 +01:00
|
|
|
|
|
|
|
# Set up the init script that brings up the system.
|
2021-06-11 16:13:01 +01:00
|
|
|
cp $BM/bm-init.sh $rootfs_dst/init
|
|
|
|
cp $CI_COMMON/init*.sh $rootfs_dst/
|
2020-05-15 17:57:25 +01:00
|
|
|
|
2021-12-02 13:13:10 +00:00
|
|
|
# Make JWT token available as file in the bare-metal storage to enable access
|
|
|
|
# to MinIO
|
|
|
|
cp "${CI_JOB_JWT_FILE}" "${rootfs_dst}${CI_JOB_JWT_FILE}"
|
|
|
|
|
2021-06-11 16:18:15 +01:00
|
|
|
cp $CI_COMMON/capture-devcoredump.sh $rootfs_dst/
|
2020-07-22 21:59:49 +01:00
|
|
|
|
2020-05-15 17:57:25 +01:00
|
|
|
set +x
|
2021-12-02 13:13:10 +00:00
|
|
|
|
2020-05-15 17:57:25 +01:00
|
|
|
# Pass through relevant env vars from the gitlab job to the baremetal init script
|
2021-06-10 10:50:44 +01:00
|
|
|
"$CI_COMMON"/generate-env.sh > $rootfs_dst/set-job-env-vars.sh
|
2020-05-15 17:57:25 +01:00
|
|
|
chmod +x $rootfs_dst/set-job-env-vars.sh
|
|
|
|
echo "Variables passed through:"
|
|
|
|
cat $rootfs_dst/set-job-env-vars.sh
|
2021-12-02 13:13:10 +00:00
|
|
|
|
2020-05-15 17:57:25 +01:00
|
|
|
set -x
|
|
|
|
|
|
|
|
# Add the Mesa drivers we built, and make a consistent symlink to them.
|
|
|
|
mkdir -p $rootfs_dst/$CI_PROJECT_DIR
|
2021-01-21 23:41:18 +00:00
|
|
|
rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/
|