#
Run a Job after another Job
This tutorial explains to you how we can run a job after another job in Jenkins.
First of all, let's create 2 jobs: Job1 and Job2. Job1 will define a simple step as in the following image:
Job2 will be defined similarly:
In the console we can see the jobs:
Now we need to configure Job1 to start the build of Job2 automatically.
For this we enter in Job1 configuration, go to "Build Steps", click on "Add post-build action" and choose "Build other project".
Input the projects you want to be built after the Job1 project. I add "Job2" and I choose "Trigger only if build is stable". Click on "Save" button.
Now we can run the Job1 and see that the Job2 is triggered automatically.
The same behaviour we get, if we go to the configuration of the Job2 and at the "Build triggers" we select and configure "Build after other projects are built" as in the following image: