CSS Build and Update System
Kunal ShroffEPICS Fall Collaboration Meeting, June 2010
Aix-en-Provence
CSS Design
2
Eclipse RuntimeOSGi (Equinox)
Java Virtual Machine
IDE with CSS applications CSS UI
CSS Core UI
Eclipse RCP UI
Eclipse IDE
CSS Headless
Eclipse RCP
CSS Core
CSS appl.CSS appl.CSS appl.
CSS appl.CSS appl.
UI CSS appl.
Slide stolen from DESY
CSS Repository : Architecture
http://cs-studio.sourceforge.net/ Restructured based on
• Functionality and usage• Build system requirements
Criteria• core/: provide contributions to the
CSS framework• applications/: plugins/features used
by one or more CSS applications• build/: contains the build scripts• product/<siteName>/: site’s product
plugin, site specific configuration files and features
CSS Repository : Mercurial Distributed SCM
• Improved scalability• Changeset support• Offline operation• no single point of failure
HgEclipse – mercurial plugin for eclipse• DVCS with best support• Clone, push, pull, commit• Add, remove, merge• Browse history
Hudson plugin
Software CVS SVN Git Mercurial
Atomic commits No Yes Yes Yes
File rename No Yes Partial Yes
Merge file renames
No No Yes Yes
Symbolic links No Yes Yes Yes
Pre/Post event hooks
Partial Yes Yes Yes
Signed revisions No No Yes Yes
Merge tracking No Yes Yes Yes
Eol conversion Yes Yes Yes Yes
Tags Yes Partial Yes Yes
Internationsl support
Yes Partial Yes
Unicode filename format
No Yes No No
CSS Repository : CVS Hg Lossless transition from CVS to Hg
CSS build The Plug-in Development Environment (PDE)
• The usual way of building is using the Export wizard which requires
- launching eclipse IDE- Creating the target- Setting up the workspace- Lots of user interaction
Headless build system• Run from command line
CSS headless build : requirements
Generic Headless build Simple and easily adaptable
for new CSS products• Reuses default build scripts
provided by PDE build system• Requires minimum
configuration. Minor modification to - Build.properties- Plugin/feature.lists
CSS headless build : build steps ./build.sh NSLS2
• Create Target (the group of plugins the CSS product is built against)
- Downloads and untars eclipse RCP + Delta pack + all other third party plugins.
• Create BuildDirectory (all the plugins/features to be built)- Collects the core,application and site specific plugins and features
to be built• Build (uses the PDE build system)
- Launches “headless” eclipse.- Builds using antRunner applications and the default product.xml
build scripts.
CSS Continuous Integration SystemUsing Hudson
Building/testing software projects continuously• Detects and fixes
integration problems continuously
• Automate Deployment – publishes the update site to sourceforge
• Makes the build process transparent.
• Saves time and effort
CSS Common Product
Continuous Integration with Hudson Ensures satisfaction of Build requirements
• This can be done by simply adding a dependency to the XYZ plugin in the product definition file.
• The plugin also needs to be added to the plugins.list in the cs-studio/product/COMMON/plugins.list.
• Make sure that all the plugins required by XYZ are also added to both the product definition and the plugin.lists file.
Does not guarantee that nothings broken• org.cssstudio.testsuite
Eclipse p2 – update management
p2 provides a provisioning platform for Eclipse-based applications• Update your RCP and OSGi applications• Provide a mechanism to install and manage new features• Provide a mechanism to manage different configurations• Manage your developers target platforms
CSS-NSLSII
p2 enabled product CSS-NSLSII update site
• http://cs-studio.sourceforge.net/nsls2/dev-updates Install/update preferences.
• List of update sites known to CSS• Update configuration options
- Self updating applications- Update from cloud- User initiated update
CSS-NSLSII update
Conclusions
Restructured repository Generic headless build system Continuous Integration with hudson p2 for installation and update management
Questions