Notifications



Search Results

Enabling notifications from Probo allows you to be automatically informed about your builds’ status and completion. Notifications are delivered by the Probo Notifier service, which listens for build events and dispatches them through one of its notification plugins. Probo currently supports webhook POST notifications, Slack messages and Jira issue comments.

Webhook Notifications

Get started with webhook notifications by adding a notifications key to your .probo.yaml file. Within this notifications key, add your webhook POST URL. You can add a single URL or multiple URLs. The webhook plugin sends a POST request with build event data to your configured URL(s) on every build event.

Examples

1
2
notifications:
  webhook: https://example.com/api/probo-notification
1
2
3
4
notifications:
  webhook:
    - https://example.com/api/probo-notification1
    - https://example.com/api/probo-notification2

Webhook Payload

The body of the POST request is a JSON object describing the event and the build that triggered it. The event field identifies the type of event - for example, ready is sent when a build completes. A typical payload looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  "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": []
  }
}

Top-Level Fields

FIELDDESCRIPTION
eventThe type of build event, such as ready when a build completes.
eventDataAdditional data associated with the event, if any.
imageThe Docker image used for the build, from your .probo.yaml file.
providerThe source control provider for the project (github, bitbucket, gitlab).
repoThe repository name.
slugThe full project slug (organization and repository).
activeWhether the project is active.
nameThe full project name.
organizationIdThe unique ID of the organization the project belongs to.
organizationThe organization name.
ownerThe owner of the repository.
buildAn object describing the build itself. See the build fields below.

Build Fields

FIELDDESCRIPTION
build.statusThe current status of the build, such as running.
build.createdAtTimestamp of when the build was created.
build.updatedAtTimestamp of when the build was last updated.
build.reapedWhether the build environment has been removed by The Reaper.
build.reapedReasonThe reason the build was reaped, if applicable.
build.projectIdThe unique ID of the project.
build.pinnedWhether the build is pinned and protected from reaping.
build.nameThe name of the build, if one was set.
build.idThe unique ID of the build.
build.linksURLs to the build environment: pullRequest, branch and build.
build.pullRequestDetails of the pull request: description, htmlUrl, name and number.
build.commitThe commit that triggered the build: htmlUrl and ref.
build.branchThe branch the build is based on: htmlUrl and name.
build.configThe parsed contents of the build’s .probo.yaml configuration.
build.containerDetails about the build’s container.
build.diskSpaceDisk usage of the build environment: realBytes and virtualBytes.
build.stepsAn array of the build steps and their results.

Slack Notifications

The Slack plugin sends a message to one or more Slack channels when a build completes. It requires a Slack app with an incoming webhook URL, which you can create at api.slack.com/apps.

For security, Slack webhook URLs are not stored in your .probo.yaml file. Instead, upload a probo-credentials.yml asset file to your project containing the webhook URL(s):

1
2
3
4
notifications:
  slack:
    webhook:
      - https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Then enable Slack notifications in your .probo.yaml file:

1
2
notifications:
  slack: true

Or provide a custom message:

1
2
3
notifications:
  slack:
    message: "Build ready for `$PROJECT_NAME` on `$BRANCH_NAME` at $BUILD_URL"

Jira Notifications

The Jira plugin automatically adds a comment to a Jira issue when a build completes. The issue is identified from the branch name, so your branches must follow the format PROJECTKEY-123/optional-description - for example, DEV-42/add-login-page. If the branch name does not match this pattern, no comment is posted.

Add your Jira credentials to your probo-credentials.yml asset file:

1
2
3
4
5
notifications:
  jira:
    url: https://yourcompany.atlassian.net
    user: jira-user@example.com
    password: your-api-token

Then enable Jira notifications in your .probo.yaml file:

1
2
notifications:
  jira: true

Or provide a custom message:

1
2
3
notifications:
  jira:
    message: "Probo build ready for $PROJECT_NAME on branch $BRANCH_NAME: $BUILD_URL"

Message Template Variables

The following variables can be used in custom Slack and Jira messages:

VARIABLEDESCRIPTION
$PROJECT_NAMEThe project name (e.g., tizzo/awesome-drupal-project).
$BRANCH_NAMEThe branch name (e.g., pr-to-close).
$BRANCH_URLURL to the branch on the provider.
$BUILD_URLURL to the Probo build environment.


Get Started with Probo.CI

Want to Try Probo today?
Get Started Fast!.

When you sign up for a Probo.CI registration code, you will get a two week trial of the plan of your choosing. For more information on how to get started, click here .

LEARN MORE ABOUT PROBO.CI'S PRICING