Ctxaug 02 amd atlassian build pipeline


Published on

Published in: Technology, Sports
  • Be the first to comment

  • Be the first to like this

Ctxaug 02 amd atlassian build pipeline

  1. 1. BUILD AND RELEASE MANAGEMENT @ AMD Central Texas Atlassian User group meeting <ul><li>Nassim Kammah </li></ul><ul><li>May 18, 2011 </li></ul>
  2. 2. <ul><li>Software written in C++, java, ruby, python and running in Unix and windows environment </li></ul><ul><li>Developer heavily rely on JIRA to organize their work (agile teams) </li></ul><ul><li>SVN is used for revision control: </li></ul><ul><ul><li>Developers work off the trunk </li></ul></ul><ul><ul><li>Branches are created at the end of a sprint, for a given version </li></ul></ul><ul><ul><li>Releases are made off the branches and tagged </li></ul></ul><ul><li>Developers are scattered across Austin, Singapore, Suzhou  packages released in 3 sites </li></ul><ul><li>Custom artifacts repository that stores files on the NAS and keep them synced across sites </li></ul><ul><li>Atlassian products in use: </li></ul><ul><ul><li>JIRA: 279 projects </li></ul></ul><ul><ul><li>Bamboo : 115 plans in 22 groups </li></ul></ul><ul><ul><li>Fisheye </li></ul></ul><ul><ul><li>Crucible </li></ul></ul>BACKGROUND INFORMATION
  3. 3. JIRA + BAMBOO RELEASE PROCESS IMPLEMENTATION 4 User request a Build via JIRA ticket (workflow action) 1 3 Bamboo runs a “build automation” suite that handles the build and release flow. JIRA bamboo Build Automation Scripts 2 Jython code is triggered on workflow transition and queues the build in Bamboo Build script update JIRA ticket Build script deploys to all sites AUSTIN SINGAPORE SUZHOU In Progress RC build requested Final build requested Build In Progress *locking state Build Release Candidate Build Production Release Start Build Start Build Build Successful Build Failed JIRA Build Workflow excerpt Transition executed by user – Jython post function triggers the build Transition executed by build automation script <ul><li>Release Preparation (done once at the end of the sprint) </li></ul><ul><li>Set Major/Minor version </li></ul><ul><li>Branch </li></ul><ul><li>Create JIRA validation tickets </li></ul><ul><li>Actual release ( release candidate/ final release/patch release) </li></ul><ul><li>Increment version </li></ul><ul><li>Tag </li></ul><ul><li>Checkout tag </li></ul><ul><li>Compile, test, package </li></ul><ul><li>Deploy to all sites </li></ul><ul><li>Generate release notes (version matrix, JIRA issues, …) </li></ul>
  4. 4. EXAMPLE OF RELEASE NOTES JIRA ticket list generated from the svn log Version matrix that highlights dependencies versions difference between previous and current release
  5. 6. A MORE COMPLEX BUILD PIPELINE (LEVERAGES BAMBOO3.0 STAGES) Lock JIRA ticket Tag Checkout Compile Unit test Package Stage Run integration test Checkout Compile Unit test Package Stage Checkout Compile Unit test Package Stage Release packages Send release notes Win32 java Win32 java & c++ Rhel5 java + c++
  6. 7. <ul><ul><li>Python based framework developed in house </li></ul></ul><ul><ul><ul><li>SOAP api for JIRA interaction, JQL queries + xml parsing, Bamboo Rest api, python svn wrapper </li></ul></ul></ul><ul><ul><ul><li>Leverages a base plans and standard actions ( tag/release/send release notes) </li></ul></ul></ul><ul><ul><ul><li>Heavily unit tested + integration tested ( on dev JIRA + dev svn) </li></ul></ul></ul><ul><ul><ul><li>Test mode ( to point to a dev JIRA), logging capabilities) </li></ul></ul></ul><ul><ul><li>The build automation framework doesn’t contain the logic to build the various projects : it invokes the various project “build tools”  ./build.sh clean compile test package </li></ul></ul><ul><ul><li>The whole framework could potentially be deprecated with bamboo3.1 and the introduction of build stages, Tasks and Final tasks and/or Atlassian release management plugin. </li></ul></ul><ul><ul><li>Push the automation to the max and save hours to your developers ( create tickets automatically, generate release notes based on JIRA fields/info in your project…) </li></ul></ul><ul><ul><li>Sharing unix and windows workspace can be painful (we’re getting around it using unix automount + windows DFS) </li></ul></ul><ul><ul><li>Beware : after some time, your users WILL forget the manual process </li></ul></ul>BUILD AUTOMATION FRAMEWORK AND LESSONS LEARNED
  7. 8. <ul><li>Trademark Attribution </li></ul><ul><li>AMD, the AMD Arrow logo and combinations thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdictions. Other names used in this presentation are for identification purposes only and may be trademarks of their respective owners. </li></ul><ul><li>©2011 Advanced Micro Devices, Inc. All rights reserved. </li></ul>
  9. 10. BUILD AUTOMATION FRAMEWORK Build Steps A standard action
  10. 11. <ul><li>bin/build_automation projectName --build-type=auto --bamboo-buildKey=${bamboo.buildKey} --bamboo-buildNumber=${bamboo.buildNumber} --sandbox=/var/tmp --package-directory=/path/to/artifact/repo </li></ul>BAMBOO BUILD COMMAND Output of bin/build_automation --help