ofelia icon indicating copy to clipboard operation
ofelia copied to clipboard

daisy chain jobs

Open willfarrell opened this issue 9 years ago • 3 comments

Say I have:

# Step 1. create new cert
[job-run "job-executed-on-new-container"]
schedule = * * * * *
image = willfarrell/letsencrypt
command = dehydrated \
            --cron \
            --domain certbot.willfarrell.ca \
            --out /etc/ssl \
            --challenge http-01

# Step 2. reload cert into nginx
[job-exec "job-executed-on-running-container"]
schedule = * * * * *
container = docker_nginx_1
command = /etc/scripts/make_hpkp \
            && /etc/init.d/nginx reload

Would it be possible to have step two triggered when step one is complete.

Proposal:

[job-run "job-executed-on-new-container"]
name = letsencrypt-renew
schedule = * * * * *
image = willfarrell/letsencrypt
command = dehydrated \
            --cron \
            --domain certbot.willfarrell.ca \
            --out /etc/ssl \
            --challenge http-01

[job-exec "job-executed-on-running-container"]
trigger = letsencrypt-renew
container = docker_nginx_1
command = /etc/scripts/make_hpkp \
            && /etc/init.d/nginx reload

Where you can set the name of a job and have a trigger that runs a new job once the trigger job is complete.

Thought?

willfarrell avatar Jan 13 '17 20:01 willfarrell