-
Notifications
You must be signed in to change notification settings - Fork 1
08_Continous_Integration
bhupender rawat edited this page Jun 20, 2021
·
7 revisions
In this lab we will explore how we can implement Continuous Integration using Jenkins:
- Add a downstream Jenkins job that will perform code coverage analysis.
- Add a downstream Jenkins job that will perform generate the artifact.
- If any of the steps fail a Slack and Email notification should be sent
-
First we have to install "cobertura" plugin into the system.
-
Create a freestyle Job name with "Code Coverage" and add your forked Github repo under the SCM section.
- Add this section in "Execute Shell"
cd SampleJavaWebApp; mvn cobertura:cobertura
- In "Post-build Actions" and select "Publish Cobertura Coverage Report"
- You will see a report like this
- Again Configure the "Code Checkout" and go to "Post-build Actions" and click on Build other Projects and add "Code Coverage" as a project
- Create a freestyle Job name with "Artifact Generation" and add your forked Github repo under the SCM section.
- Add this section in "Execute Shell"
cd SampleJavaWebApp; mvn clean package
- In "Post-build Actions" and select "Archive the Artifacts"
- Again Configure the "Code Checkout" and go to "Post-build Actions" and click on Build other Projects and add "Artifact Generation" as a project
Follow the notification steps from Code Quality Lab