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 DevOps stories
September 20, 2018

Deploying to IBM Cloud Private 2.1.0.3 with IBM Cloud Developer Tools CLI

IBM Cloud Developer Tools CLI version 2.1.4 adds deployment support for IBM Cloud Private 2.1.0.3. This version of IBM Cloud Private uses a more secure Helm for Kubernetes deployments and simplifies the cluster configuration for the client compared to prior IBM Cloud Private releases.

Continue reading

September 19, 2018

Serverless Functions vs. Virtual Machines: A Total Cost of Ownership Comparison

Explore relevant costs, performance, and availability issues for a Total Cost of Ownership comparison of virtual machine and serverless functions.

Continue reading

September 19, 2018

Tutorial: Apply End-to-End Security to Cloud Applications

A new tutorial will show you how to use IBM Cloud services to secure your cloud application. Capture and review security-related events, encrypt storage, integrate authentication, and more.

Continue reading