2024-07-20 15:41:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
|
2024-07-21 17:32:04 +02:00
|
|
|
DIRECTORY=$1
|
|
|
|
shift
|
|
|
|
BUILD_STATUS_FILE=$1
|
|
|
|
shift
|
|
|
|
ARTIFACT_FILE=$1
|
|
|
|
shift
|
|
|
|
|
2024-07-20 15:41:56 +02:00
|
|
|
# To "activate" nix on the node
|
|
|
|
export PATH=~/.local/bin:$PATH
|
|
|
|
|
|
|
|
# Install Docker on the node (-t is to store the images on /tmp because it has more disk)
|
|
|
|
# https://www.grid5000.fr/w/Docker
|
|
|
|
g5k-setup-docker -t
|
|
|
|
|
|
|
|
handler() {
|
2024-07-21 17:32:04 +02:00
|
|
|
echo "${ARTIFACT_FILE}, `date +%s.%N`, exceeded_time" >> ${BUILD_STATUS_FILE}; exit 0;
|
2024-07-20 15:41:56 +02:00
|
|
|
}
|
|
|
|
trap handler SIGUSR2
|
|
|
|
|
2024-07-21 17:32:04 +02:00
|
|
|
cd ${DIRECTORY}
|
2024-07-20 15:41:56 +02:00
|
|
|
nix develop --command $@
|