Commit bfb20398 authored by Pape, David (FWCC) - 139658's avatar Pape, David (FWCC) - 139658
Browse files

Added colored messsages.

parent 62360c44
......@@ -2,6 +2,10 @@
set -eo pipefail
BOLD_RED='\033[1;31m'
BOLD_GREEN='\033[1;32m'
NC='\033[0m' # no color
# This is needed since the runner's working directory is /tmp which is not shared between nodes.
# TODO: Find out why the runner uses /tmp instead of its working directory, anyway.
WORK_DIR="/home/pape58/runner-wd"
......@@ -82,11 +86,14 @@ if [[ "$runStage" == "build_script" ]]; then
# pass the script to sbatch, catching its job ID
chmod +x "$script"
1>&2 echo -e "${BOLD_GREEN}Sending batch script to Slurm$NC"
jobID=$(sbatch "$script" | awk '{ print $4 }')
outFile="$WORK_DIR/slurm-$jobID.out"
errFile="$WORK_DIR/slurm-$jobID.err"
1>&2 echo -e "${BOLD_GREEN}Starting live output:$NC"
# spawn subshells for live output of std and err
(tailFile "$outFile") &
pidTailOutParent="$!"
......@@ -95,6 +102,7 @@ if [[ "$runStage" == "build_script" ]]; then
# wait for job to finish
until [[ $(squeue -j "$jobID" | wc -l) -le "1" ]]; do sleep 2; done
1>&2 echo -e "${BOLD_GREEN}Job finished$NC"
pidTailOut=$(pidChildOf "$pidTailOutParent")
pidTailErr=$(pidChildOf "$pidTailErrParent")
......
......@@ -2,20 +2,19 @@ concurrent = 4
check_interval = 0
[session_server]
session_timeout = 1800
session_timeout = 1800
[[runners]]
name = "Test runner for cluster integration"
url = "https://gitlab.hzdr.de/"
token = "eQT7ugr9aK-g6TTJGxdB"
executor = "custom"
builds_dir = "/home/pape58/runner-wd/builds"
cache_dir = "/home/pape58/runner-wd/cache"
builds_dir_is_shared = true
shell = "bash"
[runners.custom]
config_exec = "/home/pape58/gitlab-runner-custom/config.sh"
run_exec = "/home/pape58/gitlab-runner-custom/run.sh"
cleanup_exec = "/home/pape58/gitlab-runner-custom/cleanup.sh"
graceful_kill_timeout = 200
force_kill_timeout = 200
name = "Test runner for cluster integration"
url = "https://gitlab.hzdr.de/"
token = "eQT7ugr9aK-g6TTJGxdB"
executor = "custom"
builds_dir = "/home/pape58/runner-wd/builds"
cache_dir = "/home/pape58/runner-wd/cache"
shell = "bash"
[runners.custom]
config_exec = "/home/pape58/gitlab-runner-custom/config.sh"
run_exec = "/home/pape58/gitlab-runner-custom/run.sh"
cleanup_exec = "/home/pape58/gitlab-runner-custom/cleanup.sh"
graceful_kill_timeout = 200
force_kill_timeout = 200
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment