Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

manually trigger a job rerun #9

Closed
lonnen opened this Issue October 18, 2012 · 9 comments

3 participants

Chris Lonnen Joe Shaw Dave Dash
Chris Lonnen

External dependencies break, network traffic gets dropped, GH outages, etc can cause builds to fail. Some means to manually rerun certain jobs would be nice. My current workaround is to add a trivial commit to cause the rebuild, then rebase the commit off the branch before merging.

Maybe a command line tool to resend the build message to Jenkins? Could be run as a one-off command from leeroy: leeroy rebuild --project=FOO --pull-requst=32

Joe Shaw
Owner

Sounds good, and is something I would like myself. I'll probably add an HTTP endpoint for it, and pull in Flask-Script so we can have a cli tool for it like you suggest.

Chris Lonnen

Alternative idea: having it serve a single webpage enumerating repos and PRs with some 'click to rerun' UI would also work. Something like the Janky interface: janky Probably a bit more work than a cli tool, though.

Chris Lonnen

I've successfully gotten a job to rerun by spoofing the JSON blob sent by github, no additional code in Leeroy necessary.

The following is enough information:

{
    "type": "SimulatedPullRequestEvent",
    "action": "synchronize",
    "pull_request": {
        "number": "921",
        "html_url": "https://github.com/mozilla/socorro/pulls/921",
        "base": {
            "repo": {
                "full_name": "mozilla/socorro"
            }
        },
        "head": {
            "repo": {
                "full_name": "rhelmer/socorro"
            },
            "sha": "76ee6507b7676e704440d45d2e7ca7af1fb71aab"
        }
    }
}

Rather than adding new code to rerun jobs, a dashboard (independent or served from leeroy) could enumerate open PR's and allow sending of spoofed events to rerun jobs.

Steve Prentice steveprentice referenced this issue from a commit in steveprentice/leeroy July 11, 2013
Steve Prentice Initiate build when PR is reopened.
When a PR has been reopened, kick off another build for the commit(s). This
also helps address issue #9 as you can close/reopen a PR to force a rebuild.
27fe283
Dave Dash

@lonnen does #25 help with this?

Chris Lonnen

@davedash #25 addresses the minor case. More often we have jobs that failed for spurious environmental reasons (bad response from pypi mirror, jenkins out of disk, etc) that need a real rerun.

Dave Dash

@lonnen Have you tried the Jenkins Rebuild plugin?

IMO, that works better, it just rebuilds whatever build you are looking at with the exact same params.

Chris Lonnen

I have not. Most of use reroy, which has some hardcoded constants specific to my leeroy instance but could easily be forked. That's been a good 80/20 for now.

Joe Shaw
Owner

Yeah, we use the rebuild plugin and it's very helpful when a build fails for some transient reason.

Dave Dash

@joeshaw well I just discovered if the parameters were screwed up (my fault) then the retry command isn't that helpful unless you know what to change =) So I wrote this to clean up my mess.

Joe Shaw joeshaw closed this in #30 October 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.