by Rich Bourdeau

Many companies use build and continuous integration tools like Jenkins, Atlassian Bamboo, Microsoft TFS and others to run jobs that build or test new releases of their applications.  In this blog post we are going to explore how vRealize Code Stream works cooperatively with Jenkins to execute build and test tasks at various stages in a release pipeline.  Jenkins is a market leading tool for building and testing software projects continuously as well as monitoring the execution of these jobs. Code Stream Jenkins OverviewJenkins is used by developers as part of a continuous integration system in order to integrate new changes, generate a fresh build and run tests to make sure that the new changes did not break the application. As part of Application Release Automation, Code Stream orchestrates the execution of Jenkins jobs as the software release moves through multiple stages between development and production.
Code Stream - Jenkins Integration 02

Using Jenkins with Code Stream
In order to use Jenkins with Code Stream, the administrator needs to define a Code Stream endpoint which contains the location, access URL, credentials and other configuration information relative to how Code Stream will discover and trigger jobs in Jenkins.

Tracking outputs from a Jenkins Build Task
The output of a Jenkins build job is new software binaries that reflect the latest build.  Code Stream’s artifact management capabilities can be integrated with Jenkins.  When configured, the output binary artifacts of a Jenkins build job can be stored and tracked by Code Stream’s Artifactory repository manager. Whenever a new build is generated, Code Stream stores the related artifacts and versions, as well as the relationship with the build number.  The build number is used at various stages throughout the release pipeline to assure consistent retrieval of the appropriate build artifacts.

Automating Testing with Jenkins
In a typical application release process, new builds need to be tested multiple times before they move on to the next step in Code Stream Jenkins Taskthe release pipeline.  Increasingly test processes are being executed automatically by tools like Selenium, Sonarqube, JMeter and SoapUI.  The vRealize Code Stream Test task can automate the execution of test jobs through the Jenkins plug-in.  The Code Stream test task definition (see screen shot)  allows users to discover and specify the Jenkins job they want to run as well as the input/output parameters that will be passed between Code Stream and the Jenkins job.    Jenkins then invokes the test job using a number of test tools supported by Jenkins.    The task output captures test results. If you configure a Jenkins test job to fail if test failures occur, then the release pipeline also fails.  In Code Stream, you can also configure gating rules that will control if a specific build is allowed to proceed to the next stage in the release pipeline.

Leveraging Jenkins Plug-ins Jenkins provides native support for running jobs using a variety of different vendors tools.  In addition there is an ecosystem of vendors who have provided plug-ins that work with Jenkins.  For a complete list of plug-ins, check out the plug-in page on the Jenkins web site.  If you don’t find one that meets your needs you can also build your own Jenkins plug-in.

Learn More
Here are some additional resources to help you learn more about vRealize Code Stream and how it can help accelerate your company’s application release process while at the same time delivering higher quality applications.