Difference between revisions of "Modeling Project Releng/Building/Scheduled Builds"

From Eclipsepedia

Jump to: navigation, search
(Specifying Dependencies)
m (Example: update)
Line 7: Line 7:
 
Say you want to run 5 builds back-to-back and have each one grab the latest, starting at 6pm and running until about 7:15pm.  
 
Say you want to run 5 builds back-to-back and have each one grab the latest, starting at 6pm and running until about 7:15pm.  
  
Login to your build server, then add this to your crontab using <code>crontab -e</code> to edit it.
+
Login to your build server, then add this to apache's crontab using '''<code>sudo -u apache crontab -e</code>''' to edit it.
  
{{codeblock|<nowiki># U/O/QTV N builds: uml2 (20-25min), ocl (10-15min), query (5-10min), validation (7-10min), transaction (12-15min)
+
{{codeblock|<nowiki># U/O/QTV N builds
00 18 * * 2 sudo -u www-data /home/www-data/build/modeling/scripts/start_cron.sh -sub uml2 -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-" -basebuilderBranch v20071030 -nosearchcvs > $HOME/cron_logs/start_cron.sh.uml2.N.txt 2>&1
+
00 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub uml2 -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.uml2.N.txt 2>&1
25 18 * * 2 sudo -u www-data /home/www-data/build/modeling/scripts/start_cron.sh -sub ocl -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/mdt-uml2-SDK|orbit" -basebuilderBranch v20071030 -nosearchcvs > $HOME/cron_logs/start_cron.sh.ocl.N.txt 2>&1
+
25 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub ocl -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/mdt-uml2-SDK|orbit" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.ocl.N.txt 2>&1
40 18 * * 2 sudo -u www-data /home/www-data/build/modeling/scripts/start_cron.sh -sub query -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch v20071030 -nosearchcvs > $HOME/cron_logs/start_cron.sh.query.N.txt 2>&1
+
40 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub query -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.query.N.txt 2>&1
50 18 * * 2 sudo -u www-data /home/www-data/build/modeling/scripts/start_cron.sh -sub validation -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch v20071030 -nosearchcvs > $HOME/cron_logs/start_cron.sh.validation.N.txt 2>&1
+
50 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub validation -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.validation.N.txt 2>&1
00 19 * * 2 sudo -u www-data /home/www-data/build/modeling/scripts/start_cron.sh -sub transaction -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/emf-validation-SDK-" -basebuilderBranch v20071030 -nosearchcvs > $HOME/cron_logs/start_cron.sh.transaction.N.txt 2>&1</nowiki>}}
+
00 19 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub transaction -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/emf-validation-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.transaction.N.txt 2>&1</nowiki>}}
  
 
== Specifying Dependencies==
 
== Specifying Dependencies==

Revision as of 11:50, 2 July 2008

Using a website or shell script for building too much work? Well, thanks to bug 207007 you can now set up builds to run on a schedule.

By default, a build will only run if there's anything new in CVS to merit a build. This can be overridden such that a build will ALWAYS run at a given time using the -nosearchcvs flag.

Example

Say you want to run 5 builds back-to-back and have each one grab the latest, starting at 6pm and running until about 7:15pm.

Login to your build server, then add this to apache's crontab using sudo -u apache crontab -e to edit it.

# U/O/QTV N builds
00 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub uml2 -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.uml2.N.txt 2>&1
25 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub ocl -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/mdt-uml2-SDK|orbit" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.ocl.N.txt 2>&1
40 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub query -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.query.N.txt 2>&1
50 18 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub validation -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*emf-sdo-xsd-SDK-|[S]200.*mdt-ocl-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.validation.N.txt 2>&1
00 19 * * 2 /home/www-data/build/modeling/scripts/start_cron.sh -sub transaction -regex "[ISR]200.*/eclipse-SDK-|[ISR]200.*/emf-sdo-xsd-SDK-|[ISR]200.*/emf-validation-SDK-" -basebuilderBranch M5_34 -nosearchcvs > $HOME/cron_logs/start_cron.sh.transaction.N.txt 2>&1

Specifying Dependencies

You can specify dependencies using either the -deps or the -regex flag (details below). Or, you can set a regex pattern in your build page's _common.php, which allows your build page to be automatically filtered to preselect only the most recent dependencies for your build.

More Info

Noteworthy flags include:

  • Specifying dependencies:
  • -deps: specify a comma-separated list of dependencies by shortname (eg., -deps emf,ocl,query)
  • -regex: specify the regular expresssion(s) to use when looking in /home/www-data/build/requests/dependencies.txt for dependencies to use; more control than -deps
  • Testing / auditing
  • -preview: don't actually run a build, just echo the command for preview (for testing your regular expressions)
  • -listDeps: if used, list the contents of the dependencies file instead of running a build.
  • Overrides
  • -noSearchCVS: don't check Search CVS for updates and just do a build
  • -basebuilderBranch: specify the basebuilder branch to use
  • Workflow
  • -addSDK: when the build completes, the URL for that build will be added to /home/www-data/build/requests/dependencies.txt so that other builds can use it as a dependency.

Additional options and flags are documented in the shell script, start_cron.sh.