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

Changed user name to $USER where possible

parent 48352826
......@@ -2,7 +2,7 @@
set -e
source "/home/pape58/gitlab-runner-custom/base.sh"
source "/home/$USER/gitlab-runner-custom/base.sh"
rm -r "/home/pape58/runner-wd/builds/$CUSTOM_ENV_PATH"
rm -r "/home/$USER/builds/$CUSTOM_ENV_PATH"
#!/usr/bin/env bash
source "/home/pape58/gitlab-runner-custom/base.sh"
source "/home/$USER/gitlab-runner-custom/base.sh"
cat << EOS
{
"builds_dir": "/home/pape58/runner-wd/builds/$CUSTOM_ENV_PATH",
"cache_dir": "/home/pape58/runner-wd/cache/$CUSTOM_ENV_PATH"
"builds_dir": "/home/$USER/builds/$CUSTOM_ENV_PATH",
"cache_dir": "/home/$USER/cache/$CUSTOM_ENV_PATH"
}
EOS
......@@ -8,7 +8,7 @@ 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"
WORK_DIR="/home/$USER"
SLURM_OPTIONS=(cpus-per-task nodes ntasks ntasks-per-node partition gres)
function getSlurmVar {
......
#!/usr/bin/env bash
set -e
module load git
#
# ./this_script [my_args...] script stage_name
# \____/
# This has to be run!
#
script=${( "${@: -2:1}" )[*]}
runStage=${( "${@: -1:1}" )[*]}
echo "run stage: $runStage"
workDir="/home/pape58/runner-wd"
module load git
if [[ "$runStage" == "build_script" ]]; then
scriptPath=$(dirname "$script")
scriptPathInTmp==$(echo "$scriptPath" | cut -c 6-) # cut off /tmp/ in the front
scriptName=$(basename "$script")
newDir="$workDir/$scriptPathInTmp"
mkdir -p "$newDir"
cp "$script" "$newDir"
srun -n 4 "$newDir/$scriptName"
else
"$script"
fi
......@@ -9,8 +9,8 @@ check_interval = 0
url = "https://gitlab.hzdr.de/"
token = "xExeZZJWhNcvYfLtWiFs"
executor = "custom"
builds_dir = "/home/pape58/runner-wd/builds"
cache_dir = "/home/pape58/runner-wd/cache"
builds_dir = "/home/pape58/builds"
cache_dir = "/home/pape58/cache"
shell = "bash"
[runners.custom]
config_exec = "/home/pape58/gitlab-runner-custom/config.sh"
......@@ -25,8 +25,8 @@ check_interval = 0
url = "https://gitlab.hzdr.de/"
token = "_D1dkrgzufLqkVSsBzbD"
executor = "custom"
builds_dir = "/home/pape58/runner-wd/builds"
cache_dir = "/home/pape58/runner-wd/cache"
builds_dir = "/home/pape58/builds"
cache_dir = "/home/pape58/cache"
shell = "bash"
[runners.custom]
config_exec = "/home/pape58/gitlab-runner-custom/config.sh"
......
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