DevOps

Integrate Jenkins with your toolchain to send job notifications, track code deployments

Share this post:

Do you have a Jenkins server that you want to integrate to a toolchain in order to deploy your applications to Bluemix (instead of using the Delivery Pipeline)? With toolchains in IBM® Bluemix® Continuous Delivery, you can integrate your Jenkins server to deploy your applications to Bluemix, but also benefit from this integration to send job notifications to other tools, such as Slack or PagerDuty, as well as track code deployments through tags, labels, and comments in your Git repository.

In addition, if your toolchain contains IBM Cloud DevOps Insights, it can apply analytics to your tags and labels to provide insights into your project as described in How to strengthen your dev team with insights on social coding and Efficient DevOps through analytics.

Example: Send job notification to other tools

Once integrated with your toolchain, and your Jenkins (Freestyle or Pipeline) job configured, other tools such as Slack or PagerDuty
will be notified that the given job was started, completed or failed.

Example Slack notifications:

Example: Track your code changes

Once the Jenkins job has successfully deployed your latest commit(s), any issues that are referenced in the commit’s comment are automatically updated with a comment and label pointing to your Bluemix toolchain, application, and org as well as to your Git commit.

Sample comment added to Git issue:

This feature will also add a similar comment to commit(s) and create tags. See Track where your code is deployed with toolchains for further details of the power and benefits of this traceability feature.

Interested in testing these cool features with your Jenkins server integrated to a toolchain? The steps are quick, simple! Follow the detailed steps below.

How to configure Jenkins integration

  • Configure your toolchain: You may integrate your Jenkins server to your existing toolchain, or start from a new empty toolchain. Integration steps are detailed in the Continuous Delivery documentation. In addition, you may integrate other tools such as Slack or PagerDuty. Another option available to you is to use the Deployment Risk Analytics with GitHub and Jenkins toolchain template.

    Note that the IBM DevOps Insights part of this integration isn’t covered in this post, but you can learn more about it in the References section at the bottom of this page. At this stage, you managed to configure your Jenkins server to have a build job that deploys your application to Bluemix. Congratulations!
  • Install the IBM DevOps plugin on your Jenkins server: Now let’s add some cool features to this Jenkins integration. Install the IBM Cloud DevOps Plugin.
  • Configure your Jenkins project: Depending on your Jenkins implementation, you may select to notify tools integrated to your toolchain when using the Freestyle project and Pipeline.

You’re now ready to test the new features you just enabled by launching a new build.

References

More What's New Stories

Share your DevOps environment with others using an open toolchain

IBM Bluemix provides many services to help you develop, deploy, and maintain your app. If you use other tools that are not part of Bluemix, you can create a tool integration in your toolchain so they are easily accessible. To help you get started, now have step-by-step instructions on creating a custom toolchain template.

Continue reading

Site Reliability Engineering, the cloud approach to operations

Successful delivery of cloud applications requires more than a focus on agile development. Operations is also essential to maintaining user satisfaction, access and to scale with growth. Cloud operations is different to traditional approaches to operations.

Continue reading

Running Selenium tests from the command line on a Delivery Pipeline

When creating a cloud application, you often want to have automated tests for your basic UI functionality, like Selenium based tests. You can run Selenium tests through Sauce Labs or you can run them locally. However, when you run them in a Delivery Pipeline in a DevOps toolchain on Bluemix, you might see errors because the server doesn’t have a way to display the browser window. This post explains how to correct them.

Continue reading