Rational Team Concert Build and Jenkins Integration RTC Build and Jenkins Integration Team 1
IBM Corporation 2016 The information contained in this presentation is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth, savings or other results. IBM, the IBM logo, Rational, Jazz, and Team Concert, are trademarks of International Business Machines Corporation in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. 2
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 3
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 4
Rational Team Concert (RTC) Build Integrates your team's build system into Rational Team Concert Features Build awareness and control Traceability from work items to source control Scheduled builds and Personal builds Rich build results Compare builds Email notifications 5
Build Awareness Request builds and inspect build results from Eclipse, Microsoft Visual Studio and Web Browser Get real time information on running builds with feeds and toast pop-ups. Get e-mail notifications on build failures 6
Support for Existing Build Infrastructure Designed to work with existing build infrastructure Command Line scripts Build tools like Apache Ant, Apache Maven, Microsoft MSBuild Continuous Intergration (CI) servers like Jenkins, Hudson and IBM Rational BuildForge 7
Build Reproducibility Every build remembers a snapshot of the source code Easy to recreate the RTC SCM workspace from a snapshot 8
Traceability to Work Items and Source Code Establishes traceability between source code, work items and build artifacts Automatically links with change sets included in the build and the work items fixed 9
Personal builds Personal Build uses a specific RTC SCM workspace instead of the build workspace Ensures yet-to-be-delivered source code does not break builds 10
Build Health Reports Out-of-the-box reports and dashboard widgets on build duration, failure rate, test failures 11
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References Overview of RTC Build 12
Build Definition A build definition defines the build Acts as a template of the steps to perform in a build Built-in templates provide specific pre-defined steps A build definition has a set of supporting build engines which can process a build 13
Build Engine A build engine represents a build system Different types of build engines Jazz Build Engine Rational Build Agent Continuous Integration servers like IBM Rational Build Forge, Hudson and Jenkins A build engine can support one or more build definitions 14
Build Request A Build Request represents a request to run a build Build Request is processed by one of the supporting Build Engines A request can add/edit/remove properties and can run on a specific Build Engine 15
Build Result A Build Result represents the output from a build Build Results can hold artifacts, links, logs, compilation and test results 16
Apache Ant Build Toolkit The Ant build toolkit is a set of Ant tasks that communicate between a build machine and a RTC repository Programmable access to RTC Build and Source Control within your build script Used in any build that can invoke Ant Push build activities, build artifacts, logs, compilation and test results to a Build Result 17
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 18
Setting up an Ant build Assign permissions to roles Create a Build Definition Provide a dedicated RTC SCM workspace Provide existing Ant script to be executed Create a Build Engine Run the Jazz Build Engine on the build machine Request a build View Build Result 19
Outline Overview of RTC Build Concepts Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 20
Demo 21
Outline Overview of RTC Build Concepts Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 22
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 23
Rational Team Concert Jenkins Integration Team Concert Plugin allows using RTC SCM as a source control provider in Jenkins jobs Annotates Jenkins changelog with RTC Work Item links and Change Set links Supports polling on a RTC SCM Workspace or a RTC SCM Stream Team Concert Plugin can report information to RTC Build by connecting to a Build Definition. Traceability links to work items and snapshot in RTC Build Result Every Jenkins build has a corresponding Build Result Request Jenkins builds from Eclipse, Microsoft Visual Studio and Web Browser. 24
Integration with RTC Source Control Traceability Team Concert Plugin computes new changes in the current compared to previous build Adds links to the following new or discarded Change Sets related Work Items Snapshot created before load 25
Integration with RTC Source Control Polling support Polling allows you monitor changes on a RTC SCM Workspace or Stream and trigger a build if changes are detected Useful to trigger builds only when changes are delivered instead of building on a schedule 26
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo Overview of RTC Jenkins Integration Setting up the RTC Jenkins Integration Demo Other Integrations References 27
Setting up RTC Jenkins Integration Configure Build Toolkit in Jenkins master and slave nodes Configure Global Settings for Team Concert Plugin Repository URL, credentials and Build Toolkit Setup RTC SCM in the Jenkins Job [Optional] Connect to a RTC build definition Request a Jenkins build View changelog in the Jenkins build 28
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 29
Demo 30
Outline Overview of RTC Build Concepts of RTC Build Setting up an Ant Build Demo About Jenkins Overview of RTC Jenkins Integration Setting up RTC Jenkins Integration Demo Other Integrations References 31
Other integrations IBM Rational Build Forge A Rational Build Forge Build Definition and Build Engine can be used to trigger Rational Build Forge projects from RTC IBM Rational Build Agent The Rational Build Agent can be used as a Build Engine to build command line or enterprise build projects, such as iseries or z/os projects. Hudson A Hudson Build Definition and Engine can be used to request Hudson builds from RTC IBM UrbanCode Deploy Publishing build artifacts to a new IBM UrbanCode Deploy component version using the Jazz Build Engine 32
References Rational Team Concert https://jazz.net/products/rational-team-concert/ Rational Team Concert Help https://jazz.net/help-dev/clm/index.jsp?topic=%2fcom.ibm.team.concert.nav.doc %2Ftopics%2Fc_node_product_rtc.html Team Concert Plugin on Jenkins wiki https://wiki.jenkins-ci.org/display/jenkins/team+concert+plugin 33
Thank you 34
Backup 35
Setting up an Ant Build 36
Create a Build Definition Creat a Jazz SCM workspace exclusively for build [Optional] Add build definition properties These are accessible as environment variables during the build Add paths to compile and test logs. [Optional] Add a schedule 37
Create a Build Engine Add supported Build Definitions [Optional] Add build engine properties These are accessible as environment variables during the build 38
Start the Jazz Build Engine Extract the zip Run jbe on the command line 39
Request a build Use Eclipse, Microsoft Visual Studio or Browser to request a build [Optional] Override build properties [Optional] Select a specific build engine [Optional] Choose a personal workspace 40
View build results View build results for a build engine or build definition in the Build Results View. Inspect a build result in the Build Result Editor View work items and source code snapshot Show change sets included in this build Navigate to the build result from the work items 41
Setting up RTC Jenkins Integration 42
Configure Build Toolkit and Global settings Configure Build Toolkit on master and slaves Provide a global configuration for RTC Useful if there are many jobs using the same RTC server 43
Setup Jazz Source Control in Jenkins Job Choose one of Build Definition, Workspace, Stream or Snapshot Override global configuration if needed 44
Request a Build and View Changelog Use the Jenkins console to request a build When using a RTC build definition, you can trigger a Jenkins build from RTC Eclipse, Visual Studio or Web clients In the Jenkins build, click Changes link to view change sets accepted, and work items included 45