Jump to: navigation, search

Difference between revisions of "Eclipse Build Available RSS Feeds"

m (Actual Feeds)
m
Line 147: Line 147:
 
These are actual feeds, currently being published.  
 
These are actual feeds, currently being published.  
  
* http://download.eclipse.org/eclipse/downloads/builds-eclipse.xml (Eclipse 3.3.x)
+
* http://download.eclipse.org/eclipse/downloads/builds-eclipse-3.3.xml (Eclipse 3.3.x)
 
* http://download.eclipse.org/tools/emf/feeds/builds-emf.xml (EMF 2.3.x, 2.2.x)
 
* http://download.eclipse.org/tools/emf/feeds/builds-emf.xml (EMF 2.3.x, 2.2.x)
 
* http://download.eclipse.org/modeling/mdt/feeds/builds-uml2-uml.xml (UML2 2.1.x, 2.0.x)
 
* http://download.eclipse.org/modeling/mdt/feeds/builds-uml2-uml.xml (UML2 2.1.x, 2.0.x)

Revision as of 09:55, 18 November 2006

Eclipse Build Available RSS Feeds

Recent changes to this document

Getting Started With RSS Feeds

To get started using this code, I'd suggest extracting everything from CVS and having a look at the examples provided:

cvs -d :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse -q checkout -r releng_test \
-d org.eclipse.build.tools org.eclipse.releng.basebuilder/plugins/org.eclipse.build.tools

For details on extracting the code using Eclipse, see Eclipse Build Available RSS Feeds Getting Started.


Make sure you get the releng_test branch, not HEAD, if you want the latest implementation.


In there, you'll find scripts_rss/ which includes ant script examples for:

  • publishing a feed (feedPublish.xml)
  • manipulating a feed, eg., updating a feed with a new entry, changing attributes on an existing entry, or just querying a feed for some value (feedManipulation.xml)
  • watching a feed and responding to changes (feedWatch.xml)


These all use feedTools.jar, with sources in src_rss/. The properties files used by these scripts are in properties/. You'll see three for feedPublish.*.properties (publishing 3 different feeds) and two for feedWatch.*.properties (two projects watching upstream feeds). You'll also find a README in there which provides more details.


You can also look at the sample data in the data/ folder, which provides three feeds (Eclipse, EMF, UML2).


The feed schema is in the schema/ folder. The Ecore model and genmodel created from the schema and used for the feed validator are in model/, and the feed validator code is best accessed from the feedValidator.xml script in scripts_rss/ and the feedValidator.jar in the root.

Sample Feeds

Support For Eclipse.org Jar Signing

So that we can identify which projects' builds are signed, the <build/> node can take an attribute for jars, thus:

<feed xmlns="http://www.w3.org/2005/Atom">
  ...
  <summary>
    <build 
      xmlns="http://www.eclipse.org/2006/BuildFeed" 
      callisto="COMPLETE" 
      href="http://download.eclipse.org/downloads/drops/S-3.2RC5-200605191206" 
      jars="UNSIGNED" 
      type="S">
    ...
  </summary>
</feed>

I'm thinking of 5 status codes, assuming the current jar signing process continues as proposed:

  • NONE (or "") - no status available or not participating
  • UNSIGNED - no jar signage available or done yet
  • SIGNREADY - jars promoted to eclipse.org, ready for signing
  • BUILDREADY - signed on eclipse.org, ready to be collected and bundled as zips and copied to UM site
  • SIGNED - signed & bundled on download page and on UM site

Support For Build Type, Branch & ID

So that we can identify what type of build a given entry is, these values can be specified for a type attribute:

<build 
  xmlns="http://www.eclipse.org/2006/BuildFeed"  
  href="http://download.eclipse.org/downloads/drops/S-3.2RC5-200605191206"
  cvsbranch="HEAD"
  branch="3.2.0"
  datetime="200605191206"
  type="S">
  • N : Nightly
  • I : Integration
  • M : Maintenance
  • S : Stable (Milestone or Release Candidate)
  • R : Release

If the property buildType is not specified, the ant task will attempt to guess the build type based on the buildID, by looking for, like this:

this.buildType = buildID.replaceAll("[^NIMSR]", NS); //$NON-NLS-1$
if (this.buildType.length()>1) 
{
  this.buildType=this.buildType.substring(0, 1);
}

In addition, there are attributes available for branch, cvsbranch and datetime. Branch is a 3-number branch id, like 3.0.0 or 2.2.1. CVS branch is a string like "HEAD" or "R3_2_maintenance", and is optional. Datetime is a 12-digit number defining YYYYMMDDhhmm, the date and time associated with the build.

Support For Coordinated Releases

So that we can identify which projects' have been posted to Callisto/Europa/Whatnot, there's an element in the <build/> node, thus:

<build 
  xmlns="http://www.eclipse.org/2006/BuildFeed" 
  href="http://download.eclipse.org/downloads/drops/S-3.2RC5-200605191206" 
  type="S">
  <coordinated status="COMPLETE">More information here</coordinated>

Status codes are limited to:

Code Purpose/Description
NONE (or "") not part of Callisto or unknown status
BUILDCOMPLETE Have you finished your RC1 bits?
UMSITEREADY Have you placed those bits in your update site?
CALLISTOSITEREADY Have you updated the features.xml file in the Callisto CVS directory?
COMPLETE Are you ready for RC1 to be declared?

Additional information, if applicable, can be placed in the text field of the node, which might include:

Note Purpose/Description
2006-05-02T20:50:00Z When do you expect to finish them?
TPTP If you're waiting for another project, which one(s)?

Where To Publish

In order to ensure that your feed data is as current as your promoted bits, it's recommended that you publish your feed to the same place you publish your zips/jars. For the EMF example, this is http://download.eclipse.org/tools/emf/feeds/builds.xml, and the CVS archived version of the file is /cvsroot/org.eclipse/www/emf/feeds/builds.xml.

If you plan to publish more than one feed or your project contains subprojects which are built or published separately, it's recommended that you name your feeds with the subproject, branch, and type, eg: http://download.eclipse.org/tools/emf/feeds/builds-emf-2.2-N.xml.

Actual Feeds

These are actual feeds, currently being published.

Working Examples

These are working examples implemented and in use, based on the samples provided in org.eclipse.build.tools.

In this scenario, EMF publishes a scheduled build every Thursday at 00:00, promotes the build to eclipse.org at 01:00, and then UML2, knowing there's an EMF build every week, starts watching the EMF feed, checking hourly at 02:00, 03:00 and 04:00, in order to pick up the latest driver to do its weekly build. As our build server is at IBM, this delay is necessary to ensure that code committed to eclipse.org has time to propagate across the nodes and to the IBM mirrors. Usually the mirrors replicate between 02:00 and 03:00, causing the UML2 build to start at 03:00.

This is only one use case. For more responsive feed watching, cron-based checks could be done 24h a day, multiple times an hour, and more than once a week.

EMF

As noted in the above scenario, publishing an EMF build automatically is done in two steps, both fired by crontab:

# M build every Thu (4); runs as web user, www-data
0 0 * * 4 sudo -u www-data /home/www-data/emf-build/scripts/start_cron.sh -proj emf -buildType M \
 -tagBuild true -branchCVS HEAD -noperf -runJDK14Tests -runJDK50Tests -runOldTests > \
 $HOME/cron_logs/start_cron.sh.emf.M.txt 2>&1
# promote M build + update feed (among other things)
0 1 * * 4 /home/www-data/emf-build/scripts/promoteToEclipse_cron.sh -proj emf -branch 2.2.1 -type M \
  -user nickb -userIES nboldt -announce > $HOME/cron_logs/promoteToEclipse_cron.sh.emf.M.txt 2>&1

One of the steps in promoting a build is to check out the latest copy of the feed from CVS, update it, commit it back to CVS, and scp it to eclipse.org. This is done by having promoteToEclipse.sh fire feedPublish.xml:

UML2

In this scenario, UML2 listens from 02:00 to 04:00 by running feedWatch.sh, but has chosen to manually verify and promote builds (also using promoteToEclipse.sh):

# respond to emf feed change; runs as web user, www-data
0 2,3,4 * * 4   cd /home/www-data/emf-build/scripts/ && sudo -u www-data \
 /home/www-data/emf-build/scripts/feedWatch.sh -proj uml2 -branchCVS R2_0_maintenance > \
 $HOME/cron_logs/feedWatch.sh.uml2.txt 2>&1

If a change is seen in the feed, run the respondToFeedChanged target in feedWatch.xml, which has been customized to update dependencies then run a build:

<target name="spawnBuild">
  <echo message="Spawn new build:"/>
  <echo message="/home/www-data/emf-build/scripts/start_cron.sh -proj uml2 ${buildType} ${buildAlias} -branchCVS ${branchCVS} ${runOptions} -URL '${feedWatchAction.TheValue.2}/${feedWatchAction.TheValue.1}' -URL '${feedWatchAction.TheValue.3}'"/>
  <exec spawn="true" executable="bash" resolveexecutable="true">
    <arg line="/home/www-data/emf-build/scripts/start_cron.sh -proj uml2 ${buildType} ${buildAlias} -branchCVS ${branchCVS} ${runOptions} -URL '${feedWatchAction.TheValue.2}/${feedWatchAction.TheValue.1}' -URL '${feedWatchAction.TheValue.3}'"/>
  </exec>
</target>

Latest Code

The latest code - shell and ant scripts, ant task code, XML Schema for the feed, and sample data - can be found in CVS, currently in the releng_test branch. This includes:

Discussion / Bugzilla

Additional Information