Child pages
  • GitHub pull request builder plugin

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added notes on Lightweight checkout

...

  • Create a new job.
  • Add the project's GitHub URL to the "GitHub project" field (the one you can enter into browser. eg: "https://github.com/janinko/ghprb")
  • Select Git SCM.
  • Add your GitHub "Repository URL".
  • Under Advanced, set "refspec" to

    Code Block
    +refs/pull/*:refs/remotes/origin/pr/*
  • In "Branch Specifier", enter

    Code Block
    ${sha1}

    or if you want to use the actual commit in the pull request, use

    Code Block
    ${ghprbActualCommit}
  • Under "Build Triggers", check "Github pull requests builder".
    • Add admins for this specific job.
    • If you want to use GitHub hooks for automatic testing, read the help for "Use github hooks for build triggering" in job configuration. Then you can check the checkbox.
    • In Advanced, you can modify:
      • The crontab line for this specific job. This schedules polling to GitHub for new changes in Pull Requests.
      • The whitelisted users for this specific job.
      • The organisation names whose members are considered whitelisted for this specific job.
  • Save to preserve your changes.
    Make sure you DON'T have "Prune remote branches before build" advanced option selected, since it will prune the branch created to test this build. As noted in issue #507 this may be achieved by unchecking 'Lightweight checkout'.

If you want to manually build the job, in the job setting check "This build is parameterized" and add string parameter named "sha1". When starting build give the "sha1" parameter commit id you want to build or refname (eg: "origin/pr/9/head").

...