1
1
Fork 0

ci.sh: passing on remaining command line options to ci job script

This commit is contained in:
david 2024-01-02 22:22:24 +01:00
parent be92823ed5
commit 1eaf3ad2ba
1 changed files with 2 additions and 1 deletions

3
ci.sh
View File

@ -167,6 +167,7 @@ else
GIT_HOST="${BASH_REMATCH[2]}"
GIT_USER="${BASH_REMATCH[3]}"
GIT_REPO="${BASH_REMATCH[4]}"
shift
else
lib_print "!Input does not seem to be a valid Git URL [$1]"
exit 1
@ -196,7 +197,7 @@ else
# Clone the repo and execute the CI script
git clone --quiet "$GIT_URL" "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO"
cd "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO"
nohup "$SCRIPTS_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.sh" > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.log" 2>&1 &
nohup "$SCRIPTS_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.sh" "$@" > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.log" 2>&1 &
echo $! > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.pid"
# Inform user of a successful job execution