Edgewall Software

Changes between Version 14 and Version 15 of Master Slave Protocol


Ignore:
Timestamp:
Nov 10, 2005, 5:07:59 PM (19 years ago)
Author:
cmlenz
Comment:

Updates for trunk

Legend:

Unmodified
Added
Removed
Modified
  • Master Slave Protocol

    v14 v15  
    4949When the build server detects that builds are necessary for some revision of the project, it queries its database of available slaves and chooses a set of slaves with non-overlapping configurations. For example, if there are 10 clients available that could execute the build of a Java project on Windows 2000 with JDK 1.4, it will only select one of those to actually perform the build.
    5050
    51 A build request consists of the [wiki:BuildRecipes build recipe], and contains the instructions that the slave must follow to execute the build:
     51A build request consists of the name of the project and the [wiki:BuildRecipes build recipe] that contains the instructions that the slave must follow to execute the build:
    5252{{{
    5353#!xml
     
    5555  Content-Type: application/beep+xml
    5656 
    57   <build xmlns:python="http://bitten.cmlenz.net/tools/python">
     57  <build project="example" xmlns:python="http://bitten.cmlenz.net/tools/python">
    5858    <step id="compile">
    5959      <python:distutils command="build"/>
     
    8787If the client accepts a build request by sending a positive reply, the server will transmit a tarball of the code base that is to be built. The client does not need to know which exact revision (or branch) of the project it is building, nor does it need to perform a checkout itself.
    8888
    89 A client accepts a build request by responding with a '''`RPY`''' message containing a `<proceed></proceed>` element in the payload. The reply must contain a list of archive formats that the slave supports for transmission of the code. For example:
     89A client accepts a build request by responding with a '''`RPY`''' message containing a `<proceed/>` element in the payload. For example:
    9090
    9191{{{
     
    9494  Content-Type: application/beep+xml
    9595
    96   <proceed>
    97    <accept type="application/tar" encoding="bzip2" />
    98    <accept type="application/tar" encoding="gzip" />
    99   </proceed>
     96  <proceed/>
    10097  END
    10198}}}
    102 
    103 In this message, the client indicates that it will accept `tar` archives with `bzip2` or `gzip` compression (preferring the former). Another client might specify that it supported only ZIP archives.
    10499
    105100After having received such a reply, the master can proceed by transmitting a snapshot of the code base to the slave:
    106101{{{
    107102  MSG 1 2 * 0 3421
    108   Content-Type: application/tar
    109   Content-Disposition: myproject-r456.tar
    110   Content-Transfer-Encoding: gzip
     103  Content-Type: application/zip
     104  Content-Disposition: myproject-r456.zip
    111105 
    112106  ...
     
    121115 
    122116  <error code="550">
    123     Invalid tar.gz archive
     117    Invalid ZIP archive
    124118  </error>
    125119  END
     
    157151}}}
    158152
    159   '''TODO''': report and log elements
     153The `time` attribute specifies the date and time at which processing of this step was started. The `duration` attribute contains the number of seconds that it took to complete the step (this may include fractions).
    160154
    161 The `time` attribute specifies the date and time at which processing of this step was started. The `duration` attribute contains the number of seconds that it took to complete the step (this may include fractions).
     155The `<step></step>` element may contain one or more child elements:
     156 * `<error></error>` elements indicate errors in the execution of the step,
     157 * `<log></log>` elements contain the build log output, and
     158 * `<report></report>` elements contain generated [wiki:DataStorage report data].
    162159
    163160After the slave has processed all of the build steps, it sends a final '''`ANS`''' message containing the element `<completed/>` in the payload: