The location of the jobs tools is used in a couple of places, so don't repeat ourselves. git-svn-id: https://svn.macports.org/repository/macports/contrib/mp-buildbot@152531 d073be05-634f-4543-b044-5fe20cf6d1d6
MacPorts Buildbot Scripts
This is a collection of scripts that will be run by the MacPorts Project's Buildbot buildslaves for continuous integration and precompilation of binary archives.
General Structure
The mpbb ("MacPorts Buildbot") driver script defines a subcommand for
each step of a build. These subcommands are implemented as separate
scripts named mpbb-SUBCOMMAND, but they are not intended to be
standalone programs and should not be executed as such. Build steps
should only be run using the mpbb driver.
The defined build steps are:
-
Update base without updating the portindex.
mpbb --prefix /opt/local selfupdate -
Checkout ports tree and update the portindex.
mpbb --prefix /opt/local --work-dir /tmp/scratch \ checkout \ --svn-url https://svn.macports.org/repository/macports/trunk \ --svn-revision 123456 -
Print one or more ports' subports to standard output.
mpbb --prefix /opt/local list-subports php cmake llvm-3.8 [...] -
For each subport listed in step 3:
a. Install dependencies.
mpbb --prefix /opt/local install-dependencies php71b. Install the subport itself.
mpbb --prefix /opt/local install-port php71c. Gather archives.
mpbb --prefix /opt/local --work-dir /tmp/scratch \ gather-archives \ --archive-site https://packages.macports.org \ --staging-dir /tmp/scratch/stagingd. Upload. Must be implemented in the buildmaster.
e. Deploy. Must be implemented in the buildmaster.
f. Clean up. This must always be run, even if a previous step failed.
mpbb --prefix /opt/local cleanup
Subcommand API
Subcommand scripts are sourced by the mpbb driver. A script named
mpbb-SUBCOMMAND must define these two shell functions:
SUBCOMMAND(): Perform the subcommand's work when invoked by the driver.SUBCOMMAND-help(): Print a brief summary of the subcommand's purpose to standard output, but do notexit. The driver converts newlines to spaces in the final output.
Scripts may define additional functions as desired. For example, the
mpbb-list-subports script defines the required list-subports and
list-subports-help functions, as well as a print-subports helper.
Subcommand scripts may use but not modify these global shell parameters:
$command: The name of the subcommand.$option_prefix: The prefix of the MacPorts installation.$option_work_dir: A directory for storing temporary data. It is guaranteed to persist for the duration of anmpbbrun, so it may be used to share ancillary files (e.g., a Subversion checkout of the ports tree) between builds of different ports.