Lawrence Velázquez 24c603886e mpbb: Don't hardcode jobs tools location
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
2016-09-12 01:59:10 +00:00
2016-08-17 21:57:59 +00:00
2016-09-12 01:59:10 +00:00
2016-09-12 01:59:04 +00:00
2016-09-12 01:59:04 +00:00

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:

  1. Update base without updating the portindex.

    mpbb --prefix /opt/local selfupdate
    
  2. 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
    
  3. Print one or more ports' subports to standard output.

    mpbb --prefix /opt/local list-subports php cmake llvm-3.8 [...]
    
  4. For each subport listed in step 3:

    a. Install dependencies.

        mpbb --prefix /opt/local install-dependencies php71
    

    b. Install the subport itself.

        mpbb --prefix /opt/local install-port php71
    

    c. Gather archives.

        mpbb --prefix /opt/local --work-dir /tmp/scratch \
            gather-archives \
            --archive-site https://packages.macports.org \
            --staging-dir /tmp/scratch/staging
    

    d. 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 not exit. 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 an mpbb run, so it may be used to share ancillary files (e.g., a Subversion checkout of the ports tree) between builds of different ports.
S
Description
No description provided
Readme
516 KiB
Languages
Tcl 66.4%
Shell 33.6%