A short guide to building PDT in Athena.
What are the files and their roles in org.eclipse.pdt.releng
- build.properties - Main configuration file. There's a couple of basic options that tell Athena which project is built (tools.pdt), how should deliverables be named (version, name). Athena will try to build the feature defined in mainFeatureToBuildID. By default several different packages Master, SDK, Tests, Update, Runtime) are built.
- build.xml - Used to invoke Athena build. This is copy-paste from other Athena projects.
- buildExtra.xml - some extra steps specific to PDT. Currently only the logic to generate php parser is here
- testing.properties - Configuration of tests to run.
- promote.xml - Used to promote files from Hudson job to downloads area. Copy-paste from other Athena projects.
- promote-I.properties - configuration of promote.xml. Specific to Integration builds. For other types of builds, create separate properties files.
How are dependencies organized?
There are three ways to satisfy dependencies in Athena build:
- Explicitly add a URL to zip with dependency that should be unzipped into Eclipse build target. The zip at top level should have eclipse directory and inside features and plugins dirs with appropriate content. Those URLs are listed in dependencyURLs property in build.properties
- List of features to install. Features to install are listed in featureIDsToInstall property. They're installed by p2 and searched in the repositories list defined in repositoryURLs. P2 automatically decides the best version to install, so for example PDT requires feature o.e.dltk.core 2.0 and there was no other way to let P2 find this feature than add dltk p2 development repository.
- List of plugins to install. Plugins to install are listed in pluginIDsToInstall property. They're resolved by p2 as well and searched in repositories defined in repositoryURLs. This is an extra option added to easily install stuff from Orbit, because Orbit doesn't have separate features for every plug-in it contains, but only a single feature.
So in future, to manage dependencies, the best way is to update the list of repositories in repositoryURLs. If a new dependency has no p2 repository, then it can be installed by using dependencyURLs. If the dependency has p2 repo, but no feature packaging, then use pluginIDsToInstall.
How are builds promoted?
Builds are not promoted automatically by Hudson. Promotion is done by ant script org.eclipse.pdt.releng/promote.xml and configured in org.eclipse.pdt.releng/promote-I.properties. To promote builds automatically, the promote.xml can be added to Crontab after a build is invoked. By default builds are invoked by Hudson every 6 hours if there were any changes in CVS. (at 3:10, 9:10, 15:10, 21:10 Ottawa time). So to promote 1 build every day, following crontab entry should be added:
30 21 * * * /opt/public/common/apache-ant-1.7.1/bin/ant -f /opt/users/hudsonbuild/.hudson/jobs/cbi-pdt-2.2-helios/workspace/build/org.eclipse.pdt.releng/promote.xml -Dpromote.properties=/opt/users/hudsonbuild/.hudson/jobs/cbi-pdt-2.2-nightly/workspace/build/org.eclipse.pdt.releng/promote-N.properties 2>/dev/null 1>~/promo_log.txt
and create org.eclipse.pdt.releng/promote-N.properties as a copy of promote-I.properties but adjust the target directories of deliverables.
By default code is fetched from HEAD. This is configured in Hudson in parameter EXTRAFLAGS -forceContextQualifier -fetchTag HEAD)
How to invoke Integration build?
Manually. Go to Hudson job, and press Build Now. In the parameters, change the BUILDTYPE from N to I. Clear the EXTRAFLAGS param. As a result, code will be fetched as defined in pdt.map file, not from HEAD and will be prefixed with I, instead of N. After build is ready, it has to be promoted manually by calling
ant promote.xml -Dpromote.properties=promote-I.properties
How is downloads page updated?
Downloads page every time goes thru the downloads directory and lists all the files that are available there. So assuming that promote.properties is configured properly, promoted files should be available in right directories and be automatically picked by downloads page.
How are tests invoked?
The name of test feature to build is defined in build.properties in testFeatureToBuildID=org.eclipse.php.test The tests to execute are defined in testing.properties. First property  is a list of test plug-ins to run. Subsequent properties map the plug-in id's to the main TestSuite classes to run.
 testPluginsToRun=org.eclipse.php.core.tests  org.eclipse.php.core.tests.suite=org.eclipse.php.core.tests.AllTests