mirror of
https://github.com/casjaysdevdocker/gitea
synced 2025-09-18 03:57:44 -04:00
🗃️ Committing everything that changed 🗃️
rootfs/usr/local/bin/start-runners rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
set -e
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Function to __log messages with timestamp
|
||||
__log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"; }
|
||||
__log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >"$RUNNERS_LOG_DIR/runners" 2>&1; }
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Function to cleanup child processes on exit
|
||||
__cleanup() {
|
||||
@@ -74,8 +74,15 @@ for i in $(seq 1 $RUNNERS_COUNT); do
|
||||
done
|
||||
unset i
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
__log "All $RUNNERS_COUNT runners started successfully"
|
||||
__log "Process IDs: $(jobs -p | tr '\n' ' ')"
|
||||
RUNNERS_ID="$(jobs -p | tr '\n' ' ')"
|
||||
if [ -n "$RUNNERS_ID" ]; then
|
||||
__log "All $RUNNERS_COUNT runners started successfully"
|
||||
__log "Process IDs: $RUNNERS_ID"
|
||||
printf 'All %s runners started successfully: %s\n' "$RUNNERS_COUNT" "$RUNNERS_ID"
|
||||
else
|
||||
__log "The runners have failed to start"
|
||||
printf '%s\n' "The runners have failed to start"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Wait for all background processes
|
||||
wait
|
||||
|
@@ -362,7 +362,7 @@ __post_execute() {
|
||||
local postMessageST="Running post commands for $SERVICE_NAME" # message to show at start
|
||||
local postMessageEnd="Finished post commands for $SERVICE_NAME" # message to show at completion
|
||||
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
|
||||
export SERVER_ADDRESS="$RUNNER_IP_ADDRESS:$GITEA_PORT" SERVER_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNERS_ENABLE="${RUNNERS_START:-5}" RUNNER_LABELS
|
||||
export SERVER_ADDRESS="$RUNNER_IP_ADDRESS:$GITEA_PORT" SERVER_TOKEN="${RUNNER_AUTH_TOKEN:-$SYS_AUTH_TOKEN}" RUNNERS_ENABLE="${RUNNERS_START:-5}" RUNNER_LABELS RUNNERS_LOG_DIR="$LOG_DIR"
|
||||
# wait
|
||||
sleep $waitTime
|
||||
# execute commands
|
||||
|
Reference in New Issue
Block a user