loadrunner
Usage:
loadrunner server [--port N --bind IP] loadrunner event URL REPO EVENT [REF --form] loadrunner payload URL EVENT FILE [--form] loadrunner status REPO SHA STATE [--context TEXT --desc TEXT --url URL] loadrunner (-h|--help|--version)
Commands:
server Start the webhook server. event Send a simulated GitHub event to a webhook server. This will send a simplified payload, with minimal properties and is intended for testing of the loadrunner server. payload Send a JSON payload file to a webhook server. To obtain a proper payload, you can copy one from your GitHub webhooks page. status Send status update to a github pull request.
Parameters:
URL The URL of the webhook endpoint. This path should responds to POST requests. If you are sending an event to a loadrunner server, send it to the root endpoint (e.g. localhost:3000). REPO The name of the repository. This can be either the short name (my_repo), or the full name (my_name/my_repo). EVENT Any GitHub event, for example: push or ping. FILE A payload JSON file. REF A branch or tag specifier. This parameter supports four formats: * branch_name * tag=tag_name * branch=branch_name * raw ref string (for example refs/tags/tagname) SHA Commit SHA string. STATE One of 'success', 'pending', 'error', 'failure'.
Options:
--port N Set the port of the webhook server. --bind IP Set the listening address of the webhook server. --context TEXT Indicate what service is sending this status. --url URL The target URL to associate with this status. --desc TEXT A short description of the status. --form Send request as x-www-form-urlencoded instead of sending JSON.
Environment Variables:
GITHUB_SECRET_TOKEN=y0urk3y Set Your GitHub secret token as set in your webhook. GITHUB_ACCESS_TOKEN=y0urAPIk3y Set Your GitHub API token (needed only for status updates).
Examples:
# Simulate push events loadrunner event localhost:3000 myrepo push master loadrunner event localhost:3000 myrepo push branch=master loadrunner event localhost:3000 myrepo push tag=staging --form loadrunner event localhost:3000 myrepo push refs/tags/staging # Send a payload file loadrunner payload localhost:3000 push payload.json # Start the server loadrunner server loadrunner server --bind 0.0.0.0 --port 3000 # Send a status loadrunner status me/myrepo 018b0ac... pending loadrunner status me/myrepo 018b0ac... success --context "My CI"