Tuesday, December 22, 2020

How to create Build Pipeline in Jenkins


Step1: login to Jenkins

Step2: Click Dashboard




Step 3. Click on New Item


Step 4. Enter Job name.

Ex. I have entered ‘SimpleDemoJob’

Steps 5. Select Freestyle project and Click on ‘OK’ button


 

Steps 6. After clicking on ‘OK’ button. You will navigate to dashboard and observe job, which we just created.








Step 7. Click on Job we just created.

Step 8. Click on ‘Configure’






Step 8. Click on Build section. And Select ‘Execute windows batch command’ from ‘Add build step’

Step 9. Add below command, just for testing purpose

echo %DATE%

echo %Time%

echo "Build process successfully done...."




Step 10. Click on Apply and Save



Step 11. Similarly, Create others job

SampleTestJob

SampleDeployJob

SampleReleaseJob





Step 12. Now add job dependency Click on ‘SampleDeployJob’

Go toà Build Trigger à Build after other project are built à Enter SampleBuildJob

 

Stepe 13. Similarly, Add job dependency for other jobs also.


Click on ‘SampleTestJob’

Go toà Build Trigger à Build after other project are built à Enter SampleDeployJob

 

Stepe 14. Similarly, Add job dependency for other jobs also.

Click on ‘SampleReleaseJob’

Go toà Build Trigger à Build after other project are built à Enter SampleTestJob

 

Now click on Dashboard,

Click on ‘+’ as highlight in below screenshot




Step 15. Enter View Name à PipelineDemo

Step 16. Select Build PipeLine view and Click on OK


Step 17. Select Upstream/ downstream config

Select Parent job name, In your case parent job is SampleBuildJob on which others jobs are depends.





Step 18. Click on OK

Step 19. Observe the Build Pipeline

When you run the pipeline by clicking on RUN button. All jobs will run in sequence

SampleBuildJob à SampleDeployJob à SampleTestJobàSampleReleaseJob




















No comments:

Post a Comment

How to install Java on EC2

***************************************** How to install Java on EC2 ***************************************** To be continued, In this post...

All Time Popular Post