Contextual Pipeline Feedback
Developers should use the tools they want and not be required to use tools that slow them down. CloudBees CI contextual feedback for Jenkins Pipelines allows you to focus on your code and not your continuous integration tool.
Jenkins Pipeline Contextual Feedback
In this lab you will create a PR for your copy of the
simple-java-maven-app repository that will provide an example of the contextual feedback provided by the CloudBees Slack plugin and the CloudBees SCM Reporting plugin.
- Navigate to your
simple-java-maven-app repository in GitHub and then navigate to the
- Click on the pencil icon to edit the file, then update the typo changing
Hello, then scroll to the bottom of the page and select the option to Create a new branch for this commit and start a pull request and the click the Propose changes button.
- On the next screen click the Create pull request button.
- Navigate back to the simple-maven-app Multibranch Pipeline on your CloudBees CI Managed Controller, click on the Pull Requests tab and once the PR-1 job completes navigate to the CloudBees Workshops Slack workspace and you will receive a new Slackbot direct message from the CloudBees CI Bot.
- Scroll to the top of the Slack message, note that the build failed, and then click on the PR#1 Update App.java link to review the GitHub pull request you created above.
- Back in GitHub, click on the Checks tab.
- On the Checks screen, expand the CloudBees CI Workshop check if not already expanded, then click on the error check and then expand the Log under the Details and you will see that there is a
PMD violation that is causing the build to fail.
- Next, click on the pmd check and review the Annotations.
- Click on the file icon to see the UnnecessaryModifier annotation in the context of the file with the PMD warning.
- On the Files changed screen you will see the exact line of code that is causing the PMD warning resulting in a failed build. Click on the 3 dots to the right of the file name to edit
- In the file editor for
src/main/java/com/mycompany/app/App.java, remove the
final modifier from the
getMessage() method and then scroll to the bottom of the screen and click the Commit changes button.
- Return to the Checks tab and you will see that another build was triggered and GitHub is waiting for the checks information.
- Once the build completes (you may need to refresh your GitHub Checks page), click on the pmd check. Next click on the checkstyle check and you will see that there is still one issue, but it is not blocking the build.
- Return the Conversation tab. Note that the Required checks - checkstyle and pmd - have all passed and the Merge pull request button is enabled. Click the Merge pull request button and on the next screen click the Confirm merge button.
- On the next screen click the Delete branch button.
- The main branch job of your simple-maven-app Multibranch Pipeline project will now complete successfully.
In this lab you saw how CloudBees CI contextual feedback allows you to spend more time in the tools you use for development while still having access to important and actionable feedback from your continuous integration pipelines.
For instructor led workshops please return to the workshop slides