This project is a part of the probo.ci suite and is responsible for sending notifications of build events to external services in the form of webhooks or similar.
Add a notifications key to your .probo.yaml file to receive notifications
when build events occur, including steps completing and builds passing or failing.
The webhook plugin sends a POST request with build event data to the configured URL(s) on every build event.
notifications:
webhook: https://example.com/api/probo-notificationMultiple webhooks:
notifications:
webhook:
- https://example.com/api/probo-notification1
- https://example.com/api/probo-notification2The webhook POST body is a JSON object with the following structure:
{
"event": "ready",
"eventData": {},
"image": "proboci/ubuntu-18.04-lamp:latest",
"provider": "github",
"repo": "awesome-drupal-project",
"slug": "tizzo/awesome-drupal-project",
"active": true,
"name": "tizzo/awesome-drupal-project",
"organizationId": "5560a4d5-a3cf-4099-bb1c-9e9abb51d417",
"organization": "tizzo",
"owner": "tizzo",
"build": {
"status": "running",
"createdAt": "2016-06-15T03:45:08.431Z",
"updatedAt": "2016-06-15T03:45:08.727Z",
"reaped": false,
"reapedReason": null,
"projectId": "bee7244f-9b97-44e6-8952-951495b2e738",
"pinned": null,
"name": null,
"id": "d571d17d-ce03-4689-9cf1-d829caebbb9a",
"links": {
"pullRequest": "http://bee7244f--pr-9.local.probo.build",
"branch": "http://bee7244f--br-pr-to-close.local.probo.build",
"build": "http://d571d17d.local.probo.build"
},
"pullRequest": {
"description": "",
"htmlUrl": "https://github.com/tizzo/awesome-drupal-project/pull/9",
"name": "Doing a simple build.",
"number": "9"
},
"commit": {
"htmlUrl": "https://github.com/tizzo/awesome-drupal-project/commit/37ec694b",
"ref": "37ec694b41ebe39e99f429e9f0eb67d7a63a7ec9"
},
"branch": {
"htmlUrl": "https://github.com/tizzo/awesome-drupal-project/tree/pr-to-close",
"name": "pr-to-close"
},
"config": {},
"container": {},
"diskSpace": {
"realBytes": 0,
"virtualBytes": 0
},
"steps": []
}
}The Slack plugin sends a message to one or more Slack channels when a build
completes (the ready event). It requires a Slack app with an incoming webhook URL.
-
Create a Slack app at https://api.slack.com/apps/new and add an incoming webhook.
-
For security, webhook URLs are not stored in
.probo.yaml. Instead, upload aprobo-credentials.ymlasset file containing the webhook URL(s):
notifications:
slack:
webhook:
- https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX- Enable Slack notifications in your
.probo.yaml:
notifications:
slack: trueOr with a custom message:
notifications:
slack:
message: "Build ready for `$PROJECT_NAME` on `$BRANCH_NAME` at $BUILD_URL"The following variables can be used in custom Slack messages:
| Variable | Description |
|---|---|
$PROJECT_NAME |
The project name (e.g., tizzo/awesome-drupal-project) |
$BRANCH_NAME |
The branch name (e.g., pr-to-close) |
$BRANCH_URL |
URL to the branch on the provider |
$BUILD_URL |
URL to the Probo build environment |
The Jira plugin automatically adds a comment to a Jira issue when a build
completes (the ready event). The issue is identified from the branch name — branches
must follow the format PROJECTKEY-123/optional-description (e.g., DEV-42/add-login-page).
- Add Jira credentials to your
probo-credentials.ymlasset file:
notifications:
jira:
url: https://yourcompany.atlassian.net
user: jira-user@example.com
password: your-api-token- Enable Jira notifications in your
.probo.yaml:
notifications:
jira: trueOr with a custom message:
notifications:
jira:
message: "Probo build ready for $PROJECT_NAME on branch $BRANCH_NAME: $BUILD_URL"When a build completes, the plugin extracts the Jira issue ID from the branch name
using the pattern PROJECTKEY-NUMBER (e.g., DEV-42). It then posts a comment to
that issue via the Jira REST API (/rest/api/2/issue/{issueId}/comment).
If the branch name does not match the expected pattern, no comment is posted.
| Variable | Description |
|---|---|
$PROJECT_NAME |
The project name (e.g., tizzo/awesome-drupal-project) |
$BRANCH_NAME |
The branch name (e.g., DEV-42/add-login-page) |
$BRANCH_URL |
URL to the branch on the provider |
$BUILD_URL |
URL to the Probo build environment |