...Continued from Part II
Go back to the dashboard, click + tab.
Select Build Pipeline View and name your view.
In Pipeline Flow section, set Select Initial Job to PULLCODE. In the Display Options section, set No Of Displayed Build to 5. You may set the Column Headers to Just the build name and number.
You will see your pipeline view.
Now, you want PULLCODE to trigger BUILD automatically. Go to PULLCODE's config. In Post-build Actions section, add an action of Trigger parameterized build on other project. Input BUILD into Projects to build field and select Trigger build without parameters. Click Save.
Go back to your pipeline view and you will see both jobs are linked in the pipeline. Click Run to start the pipeline.
The PULLCODE will be start.
Once PULLCODE is finished successfully then BUILD will be started automatically in a while.
Now your pipeline is finished successfully (indicated by green background).
PS: You may need to Enable Auto Refresh to get the screen refreshed automatically.
Go to BUILD's config. In Post-build Actions, add an action of Record JaCoCo coverage report. Leave the default settings and click Save.
Try to build the project and you will JaCoCo report of coverage.
Try to change the coverage thresholds so the project is fell in between the maximum and minimum thresholds and select Change build status according the thresholds.
Now, your build is finished in UNSTABLE status (indicated by yellow color).
You may try to change the coverage thesholds again so the project is fell below the minimum thresholds and it will finished in FAILURE status (indicated by red color).
Add a new Build Monitor View.
Select BUILD and PULLCODE to display on the monitor.
Now, you have a real-time monitor screen of your Continuous Integration pipeline.
Next, you will schedule PULLCODE to run when there is a change committed to GitHub. Go to PULLCODE's config. In the Build Triggers, select Poll SCM and input * * * * * in the Schedule field to check for changes in GitHub every minutes.
Try to make a change on GitHub and commit change and you will see from the pipeline monitor that the it will be automatically built in a while.
Try to make changes to the coverage thresholds so our project is back in green.
That's it! Hope this is useful 😉
Go back to Part I
Go back to Part II
Instructions Summary
- Part I: Install Docker
- Part I: Clone repository from GitHub
- Part I: Download and start up Jenkins
- Part II: Add new project "PULLCODE" to connect to GitHub repository
- Part II: Add new project "BUILD" to build project with Maven
- Part II: Run MariaDB and test BUILD
- Part III: Install and create Build Pipeline
- Part III: Install JaCoCo to check for test coverage
- Part III: Install Build Monitor View and schedule run interval
7. Install and Create Build Pipeline
Install Build Pipeline Plugin. (You may need to restart Jenkins if it advise you to do so.)Go back to the dashboard, click + tab.
Select Build Pipeline View and name your view.
In Pipeline Flow section, set Select Initial Job to PULLCODE. In the Display Options section, set No Of Displayed Build to 5. You may set the Column Headers to Just the build name and number.
You will see your pipeline view.
Now, you want PULLCODE to trigger BUILD automatically. Go to PULLCODE's config. In Post-build Actions section, add an action of Trigger parameterized build on other project. Input BUILD into Projects to build field and select Trigger build without parameters. Click Save.
Go back to your pipeline view and you will see both jobs are linked in the pipeline. Click Run to start the pipeline.
The PULLCODE will be start.
Once PULLCODE is finished successfully then BUILD will be started automatically in a while.
Now your pipeline is finished successfully (indicated by green background).
PS: You may need to Enable Auto Refresh to get the screen refreshed automatically.
8. Install JaCoCo to Check for Test Coverage
Install JaCoCo plugin.Go to BUILD's config. In Post-build Actions, add an action of Record JaCoCo coverage report. Leave the default settings and click Save.
Try to build the project and you will JaCoCo report of coverage.
Try to change the coverage thresholds so the project is fell in between the maximum and minimum thresholds and select Change build status according the thresholds.
Now, your build is finished in UNSTABLE status (indicated by yellow color).
You may try to change the coverage thesholds again so the project is fell below the minimum thresholds and it will finished in FAILURE status (indicated by red color).
9. Install Build Monitor View and Schedule Run Interval
Install Build Monitor View plugin.Add a new Build Monitor View.
Select BUILD and PULLCODE to display on the monitor.
Now, you have a real-time monitor screen of your Continuous Integration pipeline.
Next, you will schedule PULLCODE to run when there is a change committed to GitHub. Go to PULLCODE's config. In the Build Triggers, select Poll SCM and input * * * * * in the Schedule field to check for changes in GitHub every minutes.
Try to make a change on GitHub and commit change and you will see from the pipeline monitor that the it will be automatically built in a while.
Try to make changes to the coverage thresholds so our project is back in green.
That's it! Hope this is useful 😉
Go back to Part I
Go back to Part II
Thanks for giving a great information about DevOps Good Explination nice Article
ReplyDeleteanyone want to learn advance devops tools or devops online training
DevOps Online Training
DevOps Online Training
Awesome post
ReplyDeleteJenkins is an open-source computerization server that enables you to fabricate pipelines to mechanize the way toward building, testing, and conveying robotization. This how-to control gives you a chance to make simple mechanization work processes with Jenkins. Click Jenkins Build Monitor for the use Jenkins.
ReplyDeleteI am sure this post has helped me save many hours of browsing other related posts just to find what I was looking for. Many thanks!
ReplyDeleteDevOps Online Training
DevOps Training in Pune
I am Here to Get Learn Good Stuff About DevOps, Thanks For Sharing
ReplyDeleteDevOps
Training
DevOps
Training institute in Ameerpet
DevOps
Training institute in Hyderabad
DevOps
Training Online
Thanks for sharing nice information and nice article and very useful information.....
ReplyDeletemore : http://www.opensourcetechnologies.in/azure-devops-training-in-hyderabad
wow really super . It will be helpful for the people those who are ready to crack the interview and please also for remind what they have learned throughout concept.
ReplyDeleteJava training in Chennai
Java training in Bangalore
Java training in Hyderabad
Java Training in Coimbatore
Java Online Training