Understanding upstream and downstream jobs
An upstream job is a configured project that triggers a project as of its execution.
A downstream job is a configured project that is triggered as part of a execution of pipeline.
Upstream and downstream jobs help you to configure the sequence of execution for different operations and hence you can orchestrate the flow of execution. We can configure one or more projects as downstream jobs in Jenkins.
Getting ready
You need to divide the end-to-end automation of the application life cycle management process into multiple distinct projects.
The benefit of this strategy is that you can isolate automation tasks and execute independently on different agents.
How to do it...
Let's start with the first job for upstream and downstream jobs configuration. Keep a project that executes static code analysis as the first job:
- Go to the
Post-build Actions
section in the configuration of thePetClinic-Code
build job. - Select
Build other projects
from the available options...