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=2
     15 
     16 # if file does not exist, it will be created; if it does, it will be modified
     17 file=../data/builds-emf-2.3.xml
     18 
     19 # required URL for the feed to check
     20 feedURL=http://www.eclipse.org/emf/feeds/builds-emf-2.3.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=/*[name() = 'feed']/*[name() = 'updated']/text(); null; null
     25 
     26 # PASSING ANT TASK RESULTS TO EXTERNAL SCRIPT AS COMMANDLINE ARGUMENTS
     27 ######################################################################
     28 
     29 # The <exec> task that is run within RSSFeedWatcherTask.java, eg.
     30 #   <exec executable="/path/to/executable"><arg line="-somearg value -someotherarg anothervalue"/></exec>
     31 # 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). 
     32 
     33 # For example, if you have these properties set in this file:
     34 #   debug=1
     35 #   feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; -debug 0
     36 # you will execute the following under the covers of the org.eclipse.releng.services.RSSFeedWatcherTask:
     37 #   <exec executable="../scripts_rss/sendEmailAlert.sh">
     38 #     <arg line="-debug 1 -feedURL http://www.eclipse.org/emf/feeds/builds.xml 
     39 #       -xpath "/*[name() = 'feed']/*[name() = 'updated']/text()" 
     40 #       -oldvalue "2006-05-04T12:14:33Z" -newvalue "2006-05-11T12:14:33Z" -debug 0"/>
     41 #   </exec>
     42 
     43 # Therefore, you can use these values in the script that you execute (be it sending an email or starting a build or whatever). 
     44 # If you do NOT want to pass arguments to your executable, use the word "null" instead. This will NOT be passed to your script.
     45 
     46 
     47 # CHECKING ANT TASK RESULTS WITHIN ANT SCRIPT
     48 #############################################
     49 
     50 # 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. 
     51 # The following properties will be set after you run the task:
     52 
     53 #			feedWatchAction.Result.0       - The result returned from the <exec> task; if set, something bad happened
     54 #			feedWatchAction.Error.0        - Details about the error that occurred, if set, something bad happened
     55 #			feedWatchAction.Output.0       - Console output from your <exec>, if any; 
     56 #				this will depend on what you run in response to a feed change, and if that process produces console output
     57 #			feedWatchAction.OldValue.0 - The original value of the node you asked for, from the previous cached version of the feed
     58 #			feedWatchAction.NewValue.0 - The changed value of the node you asked for, from the latest version of the feed; 
     59 #				if you asked for changes to the test status for performance tests, this could be "PASS"; 
     60 #				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
     61 #				
     62 #			If you are watching for more than one condition, you can check for feedWatchAction.Result.0, feedWatchAction.Result.1, feedWatchAction.Result.2, etc.
     63 
     64 
     65 # RUNNING NO EXTERNAL <exec> 
     66 #############################################
     67 
     68 # If you only want to check for changes to the feed and handle the response yourself within Ant instead of an <exec>,
     69 # simply pass in the executable as "null" to prevent any shell execution from occurring. For example:
     70 
     71 # feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); null; null
     72 
     73 # If the node is found and the feed has been changed, the property feedWatchAction.NewValue.0 
     74 # (and/or feedWatchAction.NewValue.1, feedWatchAction.NewValue.2, etc.) will be set to the new changed value.
     75 
     76 
     77 ## XPATH EXAMPLES - SAMPLE NODES TO WATCH FOR CHANGES
     78 ####################################################
     79 
     80 # 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)
     81 # feedWatchActions=/*[name() = 'feed']/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; -debug 1
     82 
     83 # 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)
     84 # feedWatchActions=//*[name() = 'entry'][1]/*[name() = 'updated']/text(); ../scripts_rss/sendEmailAlert.sh; null
     85 
     86 # 3a. to watch for coordinated status changes, check the first <entry>'s <build> node's coordinated="" attribute (and respond using some custom Ant script)
     87 # feedWatchActions=//*[name() = 'entry'][1]/*/*/*[name() = 'coordinated']/@status; null; null
     88 
     89 # 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)
     90 # feedWatchActions=//*[name() = 'entry'][1]/*/*[name() = 'build']/@jars; null; null
     91 
     92 # 3c. to watch for changes in the current build's performance test results on linux-gtk (and respond using some custom Ant script)
     93 # feedWatchActions=//*[name() = 'entry'][1]/*/*/*/*[@type = 'performance']/*[name() = 'result'][@os = 'linux'][@ws = 'gtk']/text(); null; null
     94