Skip to content

Brew Test Bot For Core Contributors

Mike McQuaid edited this page Sep 11, 2013 · 6 revisions

If a build has run and passed on brew test-bot then it can be used to quickly bottle formulae.

There are three types of Jenkins jobs:

Homebrew

This job automatically builds anything committed to the master branch. On failure it sends an email to [email protected]. It tests rather than builds bottles.

Homebrew Pull Requests

This job automatically builds any pull requests submitted to mxcl/homebrew. On success or failure it updates the pull request status (see more details on the main Brew Test Bot wiki page). It builds but does not upload bottles.

Homebrew Testing

This job is manually triggered to run brew-test-bot.rb on with user-specified parameters. It builds but does not upload bottles.

Bottling

To bottle a job:

  1. Find the job and build number (e.g. "Homebrew Testing" and build number #1735)
  2. Ensure the job has already completed successfully
  3. Go to the main Jenkins dashboard on http://bot.brew.sh
  4. Click the Bottling tab on the dashboard corresponding to the job (e.g. for "Homebrew Testing" click "Homebrew Testing Bottling"):
    Bottling tabs
  5. Find the build pipeline corresponding to the build number
  6. Click on the Bottles trigger button in the bottom right corner:
    Bottling trigger
  7. When the Bottles job finishes click the console button in the bottom right corner:
    Bottling console
  8. The bottles have been uploaded to SourceForge. The bottle block will be displayed on the console page:
    Bottling block
  9. Copy and paste the bottle block into the local formula.
  10. Run brew fetch --force-bottle $FORMULA to check the SHA-1 in the formula matches the uploaded file.
  11. Commit and push the formula.

Caveats

  • If you are trying to build a new bottle revision and the job has removed the old revision then the Bottles job will overwrite the previous version on upload (as brew bottle didn't know there was a previous bottle revision).
  • If the outputted bottle block isn't correct/as expected then you will need to bottle manually, something has gone wrong.
  • Due to the above it's recommended that you request pull-requests remove the SHA-1s from bottle blocks but leave the e.g. revision intact.
Clone this wiki locally