Match the trigger failure patterns before the success one, since the failures echo a path back
This commit is contained in:
@@ -418,21 +418,24 @@ echo start-failed
|
|||||||
exit 1
|
exit 1
|
||||||
PHASE2_TRIGGER
|
PHASE2_TRIGGER
|
||||||
)
|
)
|
||||||
|
# Failure patterns are matched first, and they echo a path back. An owner whose
|
||||||
|
# SCRIPTS_DIR happened to contain the word "triggered" would otherwise satisfy a
|
||||||
|
# leading *triggered* glob and report success for a launch that never happened.
|
||||||
case "$_phase2_out" in
|
case "$_phase2_out" in
|
||||||
*triggered*)
|
|
||||||
echo "Phase 2 triggered on $OWNER ✅"
|
|
||||||
log "Watch on $OWNER: Scheduler tab, or tail -f /var/log/varaverk/Partnership/partnership_onboard.log"
|
|
||||||
PHASE2_TRIGGERED=true
|
|
||||||
;;
|
|
||||||
missing-runner:*)
|
missing-runner:*)
|
||||||
error "Phase 2 not started — no run_job.sh at ${_phase2_out#missing-runner:} on $OWNER"
|
error "Phase 2 not started — no run_job.sh at ${_phase2_out#missing-runner:} on $OWNER"
|
||||||
;;
|
;;
|
||||||
missing-script:*)
|
missing-script:*)
|
||||||
error "Phase 2 not started — no partnership_onboard.sh at ${_phase2_out#missing-script:} on $OWNER"
|
error "Phase 2 not started — no partnership_onboard.sh at ${_phase2_out#missing-script:} on $OWNER"
|
||||||
;;
|
;;
|
||||||
*start-failed*)
|
start-failed)
|
||||||
error "Phase 2 launch on $OWNER did not produce a job record — check run_job.sh there"
|
error "Phase 2 launch on $OWNER did not produce a job record — check run_job.sh there"
|
||||||
;;
|
;;
|
||||||
|
triggered)
|
||||||
|
echo "Phase 2 triggered on $OWNER ✅"
|
||||||
|
log "Watch on $OWNER: Scheduler tab, or tail -f /var/log/varaverk/Partnership/partnership_onboard.log"
|
||||||
|
PHASE2_TRIGGERED=true
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
warn "Could not auto-trigger Phase 2 on $OWNER"
|
warn "Could not auto-trigger Phase 2 on $OWNER"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user