Connecting projects downstream/upstream
A project can have one or several upstream projects, which means that a build for the current project may be scheduled when an upstream build is finished. Per default every stable upstream build will schedule a build in the downstream project, but there are several options and plugins which can customize this behaviour.
A project can have one or several downstream projects. The current project is then known as an upstream project of the downstream project. See Upstream project for what this means regarding scheduling of builds.
The upstream job is the one that is triggered before the actual job is triggered. The downstream job is the one that is triggered after the actual job is triggered. We can configure the actual job not to be triggered if the upstream job is failed. In the same way, we can configure the downstream job not to be triggered if the actual job is failed.
Order of job triggers:
Upstream Job -> Actual Job -> Downstream Job
The following figure shows 2 upstream projects connected to the current project:
In this case, these 2 jobs will be executed before executing the Build step of the current project's job.