Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daisy chain jobs #19

Open
willfarrell opened this issue Jan 13, 2017 · 2 comments
Open

daisy chain jobs #19

willfarrell opened this issue Jan 13, 2017 · 2 comments

Comments

@willfarrell
Copy link

willfarrell commented Jan 13, 2017

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
Copy link
Author

Thinking about it a little more; one could use [job-local "job-executed-on-current-host"] and daisy chain the docker commands, but it would be messy looking.

@mcuadros
Copy link
Owner

Why not just chain the commands? But yes maybe can be useful, a PR is more than welcome

jsixface pushed a commit to jsixface/ofelia that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants