Commit 73119336 authored by Pape's avatar Pape
Browse files

Basic version.

parent 0c545bab
JOB_NAME="$CUSTOM_ENV_CI_RUNNER_ID-$CUSTOM_ENV_CI_PROJECT_ID-$CUSTOM_ENV_CI_CONCURRENT_PROJECT_ID-$CUSTOM_ENV_CI_JOB_ID"
NUM_NODES=1
NUM_TASKS=1
TIME="10:00"
#!/usr/bin env
set -e
source base.sh
scancel -n "$JOB_NAME"
exit 0
#!/usr/bin/env bash
set -e
cat << EOS
{
}
EOS
exit 0
#!/usr/bin/env bash
set -e
source base.sh
salloc -N "$NUM_NODES" -n "$NUM_TASKS" --time="$TIME" -J "$JOB_NAME"
exit 0
......@@ -2,16 +2,33 @@
set -e
source base.sh
#
# ./this_script [my_args...] tmp_script stage_name
# \___________________/
# This has to be run!
# \________/
# This has to be run!
#
echo "Run stage: ${@: -1}"
BLUE='\033[0;34m'
NC='\033[0m' # No Color
script="${@: -2:1}"
runStage="${@: -1}"
echo "run stage: $runStage"
if [[ "$runStage" == "build_script" ]]; then
scriptPath="$(dirname $script)"
scriptPathInTmp==$(echo "$scriptPath" | cut -c 5-) # cuts off /tmp in the front
scriptName="$(basename $script)"
newDir="/home/pape58/runner-wd$scriptPathInTmp"
mkdir -p "$newDir"
cp "$script" "$newDir"
srun -N "$NUM_NODES" -n "$NUM_TASKS" "${@: -2}"
echo -e "${BLUE}##### SRUN #####${NC}"
srun "$newDir/$scriptName"
else
"$script"
fi
exit 0
......@@ -5,18 +5,14 @@ check_interval = 0
session_timeout = 1800
[[runners]]
name = "Test runner"
name = "Test runner for cluster integration"
url = "https://gitlab.hzdr.de/"
token = "XXKxNsu6AmP1d2Dj_UNc"
token = "eQT7ugr9aK-g6TTJGxdB"
executor = "custom"
builds_dir = "/home/pape58/builds"
cache_dir = "/home/pape58/cache"
shell = "bash"
builds_dir = "builds"
cache_dir = "cache"
test_key = ""
[runners.custom]
config_exec = "config.sh"
prepare_exec = "prepare.sh"
run_exec = "run.sh"
cleanup_exec = "cleanup.sh"
graceful_kill_timeout = 200
force_kill_timeout = 200
......@@ -17,10 +17,6 @@ ln -frs "$REPO_DIR/runner-config.toml" "config.toml"
mkdir -p "$LOCAL_BIN_DIR"
cd "$LOCAL_BIN_DIR"
ln -frs "$REPO_DIR/config.sh" "config.sh"
ln -frs "$REPO_DIR/base.sh" "base.sh"
ln -frs "$REPO_DIR/prepare.sh" "prepare.sh"
ln -frs "$REPO_DIR/run.sh" "run.sh"
ln -frs "$REPO_DIR/cleanup.sh" "cleanup.sh"
exit 0
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