Setup Jenkins BuildPipeline - Bug Reaper

                  Bug Reaper

Lean about Automation Testing,Selenium WebDriver,RestAssured,Appium,Jenkins,JAVA,API Automation,TestNG,Maven, Rest API, SOAP API,Linux,Maven,Security Testing,Interview Questions

Sunday 16 June 2019

Setup Jenkins BuildPipeline



Jenkins Provide Capability to Have pipelines of the jobs


Jenkins Pipeline (or simply "Pipeline") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins

A pipeline is a collection of jobs that brings the software from version control into the hands of the end users by using  automation tools.

Generally in Jenkins Pipeline we use

Buildmvn install

Deploy
some shell scripts to deploy jar or war files

Testing
mvn test

Release to production
tasks



Download Plugin "Build Pipeline"



Note: This way of creating Jenkins Pipeline with Plugins is useful only for "small scale applications only"

1.)Create a Main Job (in my case name is Grid)That will invoke Pipeline

2.) Create Downstream for this project (in my case DownStream project here is "hello") as shown in below pic



3.) For hello Project Mark a Downstream project i.e. in my case "MyNewFramework"


4.) As you can see in above pic "My New Framework" Project have 'hello' as Upstream Project.



 5.) Now Create a new View from Jenkins Home Page by clicking + button



6.) Now in Pipeline Flow, select Based on upstream/dropdown relationship

7.) Select the Initial Job of Pipeline in my case its Grid, as this job has two downstream jobs linked.

8.) Enter number of Displayed Builds. (It will allow home many builds you can see on a screen)

 9.) After you save i.e. Apply and Ok, you can see how your Build Pipeline view will look like below




As you can see in above image three projects i.e. Grid-->Hello-->MyNewFramework are in pipeline flow :)


Note: if you don't want upstream or downstream jobs

You can choose below options in 2nd Job and select 1st job as "Projects to Watch" for





















If your any of the job fails in the Pipeline, you can retry and run that particular job again no need to run, whole pipeline again




No comments:

Post a Comment