compose/pkg/e2e/testdata/TestRunManualJob/compose.yaml
Nicolas De Loof 2804f9d4ae run: honor the explicit manual: false opt-out on jobs
Per the spec, any job can be triggered manually by an explicit run
command, its automated triggers notwithstanding — so run now accepts
scheduled jobs too. The exception is a job explicitly declared with
triggers.manual: false, which run rejects: meant for scheduled jobs
whose out-of-schedule execution would be harmful.

compose-go is bumped to the jobs-branch commit making Manual tri-state
(*bool) and allowing manual and schedule to be combined.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-21 16:35:20 +02:00

27 lines
495 B
YAML

services:
db:
image: alpine
init: true
command: sleep infinity
jobs:
migrate:
image: alpine
command: sh -c 'echo "migration done"'
triggers:
manual: true
depends_on:
db:
condition: service_started
backup:
image: alpine
command: echo backup
triggers:
schedule:
- cron: "0 3 * * *"
rotation:
image: alpine
command: echo rotation
triggers:
manual: false
schedule:
- cron: "0 3 1 * *"