Home | History | Annotate | Download | only in properties
      1 ###############################################################################
      2 # Copyright (c) 2005, 2006 IBM Corporation and others.
      3 # All rights reserved. This program and the accompanying materials
      4 # are made available under the terms of the Eclipse Public License v1.0
      5 # which accompanies this distribution, and is available at
      6 # http://www.eclipse.org/legal/epl-v10.html
      7 #
      8 # Contributors:
      9 #     IBM Corporation - initial API and implementation
     10 ###############################################################################
     11 # properties for RSSFeedWatcherTask.java
     12 
     13 # one of 0|1|2
     14 debug=0
     15 
     16 # if file does not exist, it will be created; if it does, it will be modified
     17 file=../data/builds-eclipse-3.4.xml
     18 
     19 # required URL for the feed to check
     20 feedURL=http://download.eclipse.org/downloads/builds-eclipse.xml
     21 
     22 # Feed Watch Actions - must be defined as triplets of [xpath0]; [script0]; [commandline0]; [xpath1]; [script1]; [commandline1]; ...
     23 # must be separated by semi-colons. Line breaks are permitted for clarity and will be String.trim()'d
     24 feedWatchActions=\
     25 //*[name()='entry'][1]/*/*[name()='build']/@href;null;null;\
     26 //*[name()='entry'][1]/*/*[name()='build']/*[name()='releases']/*[@os='linux'][@ws='gtk'][@type='SDK']/text();null;null;\
     27 //*[name()='entry'][1]/*/*[name()='build']/@type;null;null;\
     28 
     29 # PASSING ANT TASK RESULTS TO EXTERNAL SCRIPT AS COMMANDLINE ARGUMENTS
     30 ######################################################################
     31 
     32 # The <exec> task that is run within RSSFeedWatcherTask.java, eg.
     33 #   <exec executable="/path/to/executable"><arg line="-somearg value -someotherarg anothervalue"/></exec>
     34 # will be passed some default commandline arguments BEFORE any you might want to specify as well (so that you can override them if you wish). 
     35 
     36 # For example, if you have these properties set in this file:
     37 #   debug=1
     38 #   feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; -debug 0
     39 # you will execute the following under the covers of the org.eclipse.releng.services.RSSFeedWatcherTask:
     40 #   <exec executable="../scripts_rss/sendEmailAlert.sh">
     41 #     <arg line="-debug 1 -feedURL http://www.eclipse.org/emf/feeds/builds.xml 
     42 #       -xpath "/*[name() = 'feed']/*[name() = 'updated']/text()" 
     43 #       -oldvalue "2006-05-04T12:14:33Z" -newvalue "2006-05-11T12:14:33Z" -debug 0"/>
     44 #   </exec>
     45 
     46 # Therefore, you can use these values in the script that you execute (be it sending an email or starting a build or whatever). 
     47 # If you do NOT want to pass arguments to your executable, use the word "null" instead. This will NOT be passed to your script.
     48 
     49 
     50 # CHECKING ANT TASK RESULTS WITHIN ANT SCRIPT
     51 #############################################
     52 
     53 # If you want to run some <exec> and then check the results of that execution, you can do so in the ant script that calls RSSFeedWatcherTask. 
     54 # The following properties will be set after you run the task:
     55 
     56 #			feedWatchAction.Result.0       - The result returned from the <exec> task; if set, something bad happened
     57 #			feedWatchAction.Error.0        - Details about the error that occurred, if set, something bad happened
     58 #			feedWatchAction.Output.0       - Console output from your <exec>, if any; 
     59 #				this will depend on what you run in response to a feed change, and if that process produces console output
     60 #			feedWatchAction.OldValue.0 - The original value of the node you asked for, from the previous cached version of the feed
     61 #			feedWatchAction.NewValue.0 - The changed value of the node you asked for, from the latest version of the feed; 
     62 #				if you asked for changes to the test status for performance tests, this could be "PASS"; 
     63 #				if you asked for any changes to the feed, this will be the XML datestamp of the last update, eg: 2006-05-04T12:14:33Z
     64 #				
     65 #			If you are watching for more than one condition, you can check for feedWatchAction.Result.0, feedWatchAction.Result.1, feedWatchAction.Result.2, etc.
     66 
     67 
     68 # RUNNING NO EXTERNAL <exec> 
     69 #############################################
     70 
     71 # If you only want to check for changes to the feed and handle the response yourself within Ant instead of an <exec>,
     72 # simply pass in the executable as "null" to prevent any shell execution from occurring. For example:
     73 
     74 # feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); null; null
     75 
     76 # If the node is found and the feed has been changed, the property feedWatchAction.NewValue.0 
     77 # (and/or feedWatchAction.NewValue.1, feedWatchAction.NewValue.2, etc.) will be set to the new changed value.
     78 
     79 
     80 # XPATH EXAMPLES - SAMPLE NODES TO WATCH FOR CHANGES
     81 ####################################################
     82 
     83 # 1. to watch for ANY change in the feed, check the <feed>'s <updated> node (and respond with an email, passing -debug 1 to the mail script)
     84 # feedWatchActions=/*[name() = 'feed']/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; -debug 1
     85 
     86 # 2. to watch for ANY changes in the current build, check the first <entry>'s <updated> node (and respond with an email, no commandline flags)
     87 # feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; null
     88 
     89 # 3a. to watch for coordinated status changes, check the first <entry>'s <build> node's coordinated="" attribute (and respond using some custom Ant script)
     90 # feedWatchActions=//*[name() = 'entry'][1]/*/*/*[name() = 'coordinated']/@status; null; null
     91 
     92 # 3b. to watch for jar signing status changes, check the first <entry>'s <build> node's jars="" attribute (and respond using some custom Ant script)
     93 # feedWatchActions=//*[name() = 'entry'][1]/*/*[name() = 'build']/@jars; null; null
     94 
     95 # 3c. to watch for changes in the current build's performance test results on linux-gtk (and respond using some custom Ant script)
     96 # feedWatchActions=//*[name() = 'entry'][1]/*/*/*/*[@type = 'performance']/*[name() = 'result'][@os = 'linux'][@ws = 'gtk']/text(); null; null
     97