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

Define dependencies between jobs #17

Open
bmuschko opened this issue Jul 24, 2011 · 0 comments
Open

Define dependencies between jobs #17

bmuschko opened this issue Jul 24, 2011 · 0 comments

Comments

@bmuschko
Copy link

Often times I run into situations where I need to define two or more jobs that depend on each other. It would be great if you could define dependencies between them. Some situations I could think of are:

  • Only trigger job two if job one was triggered and has finished.
  • If job one is done commence running job two.
  • If job one failed don't run job two at all.

For that we could define a new closure. Something like this:

static dependencies = {
    onSuccess {
        trigger class: MyTriggerClass, invoke: true
    }

    onFailure {
        log.error "Failed to run job."    
    }
}
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

1 participant