-
Notifications
You must be signed in to change notification settings - Fork 9
08_Continous_Integration
Abhishek Dubey edited this page Oct 22, 2020
·
3 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