Flash Camp Chennai - Build automation of Flex and AIR applications


Published on

Complete session on how to set up a continuous integration server for compiling and deploying Flex, Flash and AIR applications. The build process also include code quality check, code duplication check, compiler warning reporting, TODO and FIXME list reporting, and Unit testing.

Published in: Technology
1 Like
  • @Daniel Lohse HI any other step by step method to automate build ? Newbie in flex and flash. pl help
    Are you sure you want to  Yes  No
    Your message goes here
  • Check out our blog post on this subject: http://techblog.dozeo.com/post/56336651309/using-ant-for-build-and-deployment-automation-of-flash.
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Flash Camp Chennai - Build automation of Flex and AIR applications

  1. 1. Build Automation of Flash, Flex, and AIR apps Vipin Chandran Project Manager – Impelsys India http://twitter.com/flashchemist http://blog.flashchemist.com
  2. 2. What is build automation? <ul><li>Build automation is the act of scripting or automating a wide variety of tasks that software developers do in their day-to-day activities including things like: </li></ul><ul><li>compiling computer source code into binary code </li></ul><ul><li>packaging binary code </li></ul><ul><li>running tests </li></ul><ul><li>deployment to production systems </li></ul><ul><li>creating documentation and/or release notes </li></ul>- Wikipedia
  3. 3. Identify these?
  4. 4. Run – Builds a swf movie with debug information Debug – Run the swf in Debug Perspective Profiler – Run the swf in Profiler Perspective
  5. 5. Export Release Build What you do when you release a Flex/AIR application?
  6. 6. Export Release Build Is this the only thing you need, to deploy a software? You may need to: <ul><li>Rename the swf file </li></ul><ul><li>Encrypt the swf file (to protect from de-compilation) </li></ul><ul><li>Add other files to the release folder. </li></ul><ul><li>May zip the files and folders. </li></ul><ul><li>Collect all the related source files for delivery. </li></ul><ul><li>Upload to an FTP </li></ul><ul><li>Upload to a server </li></ul><ul><li>Send an Email saying that the release has been made. </li></ul><ul><li>Prepare a Release Note. </li></ul><ul><li>Alert the developers that a build is failed due to errors. </li></ul>
  7. 7. Pre Compilation tasks Compilation Post Compilation tasks Compile the application <ul><li>All developers check-in the code to source repository </li></ul><ul><li>Make changes to configuration to reflect release requirements </li></ul><ul><li>Change paths, change services... </li></ul><ul><li>Create source code files with specific configurations we want... </li></ul><ul><li>Rename the swf file/s </li></ul><ul><li>Encrypt the swf files </li></ul><ul><li>Create output folder structure </li></ul><ul><li>Copy required dependent files into the folders. </li></ul><ul><li>Run a unit test </li></ul><ul><li>Run a code quality tool and report the problems. </li></ul><ul><li>Run a compiler warning tool and report all the warnings. </li></ul><ul><li>Run documentation tool and create a documentation. </li></ul><ul><li>Upload the files to a server using SCP. </li></ul><ul><li>Send Email to stake holders about the success/failure of this process. </li></ul><ul><li>Archive the files and keep in an svn repository. </li></ul><ul><li>Tag the source repository if with details. </li></ul><ul><li>....... </li></ul>
  8. 8. Change Config (A) Compile Copy, rename, upload etc. Change Config (B) Compile Copy, rename, upload etc. While development For Release
  9. 9. Build Automation or Release Engineering “ Release engineering is to software engineering as manufacturing is to an industrial process” “ It is often seen as a sign of organizational and developmental maturity”
  10. 10. Types of automation <ul><li>On-Demand automation such as a user running a script at the command line </li></ul><ul><li>Scheduled automation such as a continuous integration server running a nightly build </li></ul><ul><li>Triggered automation such as a continuous integration server running a build on every commit to a version control system. </li></ul>
  11. 11. On-Demand automation Simple command line Apache ANT Scripting languages like PERL, Python, PHP etc.. [DEMO] [DEMO -2] [DEMO]
  12. 12. Scheduled and Triggered automation Continuous Integration Server running scheduled builds (nightly build) Continuous Integration Server running build on every svn commit (any kind of trigger)
  13. 13. What is Continuous Integration Server? Build runs here... Source code repository. (SVN, CVS etc.) Individual developers commit the code to this server Notify
  14. 14. Continuous Integration is a software development practice where members of a team integrate their work frequently, leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. What is Continuous Integration Server?
  15. 15. What are the advantages? <ul><li>We keep a Single Source Repository. </li></ul><ul><li>Automate the Build </li></ul><ul><li>Make our Build Self-Testing </li></ul><ul><li>Everyone Commits To the Mainline Every Day </li></ul><ul><li>Test in a Clone of the Production Environment, every day from day 1. </li></ul><ul><li>Make it Easy for Anyone to Get the Latest Executable </li></ul><ul><li>Everyone can see what's happening </li></ul><ul><li>Automate Deployment </li></ul>
  16. 16. What it will do? Pre compile tasks – Configuration settings, environment settings, checkout code from repos, copy or create certain files Compilation Post compilation tasks - Testing, Code quality analysis Documentation, Build deployment etc.. Single Process
  17. 17. Few examples Hudson CI
  18. 18. Cruise Control Few examples
  19. 19. Demo of a sample Hudson Job
  20. 20. Tools used for this job MXMLC COMPC Compilers ADT AIR Packager Flex SDK FlexPMD FlexCPD FlexUnit Open source tools from Adobe
  21. 21. Reports generated by Hudson
  22. 22. Cons Initial setup time required. well-developed test-suite required to achieve automated testing advantages large-scale refactoring can be troublesome due to continuously changing code base hardware costs for build machines can be significant
  23. 23. Questions?? twitter.com/flashchemist http://blog.flashchemist.com