Webtools/leeroy

< Webtools
Revision as of 22:49, 24 October 2012 by Lonnen (talk | contribs) (Created page with "LeeroyBot runs tests pull requests before they're merged. Read more about it on the [https://blog.mozilla.org/webdev/2012/10/19/pre-integration-testing/ WebDev Blog]. === Gettin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LeeroyBot runs tests pull requests before they're merged. Read more about it on the WebDev Blog.

Getting Leeroy set up for your project

  • Create a new job on ci.mozilla.org
    • job name '[your job name]-github'
    • copy existing job
  • Configure your new job
    • Job Notifications
      • Add Endpoint
      • Check "This build is parameterized"
        • add String Parameter
          • name "GIT_BASE_REPO"
          • default value: mozilla/[project name]
        • add String Parameter
          • name "GIT_HEAD_REPO"
          • default value: mozilla/[project name]
        • add String Parameter
          • name "GIT_SHA1"
          • default value: "master"
        • add String Parameter
          • name "GITHUB_URL"
          • default value: *leave blank*
    • Source Code Management
    • remove any build artifact archiving and fingerprinting
    • (optional) remove any notifications to IRC or e-mail
    • (optional) remove any non-test steps such as coverage, leeroy only cares about pass / fail
  • Configure Github
    • Add LeeroyBot (https://github.com/leeroybot ) to your team if he isn't already
      • necessary to set up hooks that cannot be set manually from the UI
  • File a bug in your product
    • assign to :Lonnen
    • summary "hook up leeroy"?
    • include
      • github_repo: "mozilla/[your project]"
      • jenkins_job_name: "[your project]-github"
  • After Leeroy has been updates
    • Lonnen will assign the bug back to you
    • open a pull request that should not break the build
      • make a trivial documentation change
      • close after it passes
    • open a pull request that will break the build
      • delete models.py
      • close after it fails
    • link both in the bug and mark it resolved -> fixed
    • It's important that these requests are opened or updated /after/ intergration is established.

Troubleshooting

Leeroy listens to events as they happen with no queue or storage. If a network event is dropped and something gets stuck in a strange state, the only thing you can do is change the sha or open a new PR. There is an issue open on leeroy to change this. Until then, I suggest adding a trivial commit (add some whitespace to your readme) and rerunning, then popping that commit off the PR with a rebase after it passes.