Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the Jenkins connector page.

Install the Notification plugin

The Notification plugin (by Tikal Knowledge) sends a JSON message for each phase of a build. Install it once on your Jenkins controller.

1

Open the plugin manager

Sign in to Jenkins as an administrator.

  • Click Manage Jenkins (the gear icon in the top-right corner).
  • Under System Configuration, click Plugins.
Manage Jenkins page with the gear icon and the Plugins entry highlighted
2

Install the plugin

Install the Notification plugin from the Jenkins plugin catalog. Jenkins loads it without a restart.

  • Click Available plugins.
  • In Search available plugins, type notification.
  • Select the Notification plugin (plugin ID notification).
  • Click Install.
Available plugins tab with the search box and the Install button highlighted
3

Confirm the plugin is installed

Check that the plugin is active before you configure any job.

  • Click Installed plugins.
  • Check that Notification plugin is listed and enabled.
Installed plugins tab showing the enabled Notification plugin

Send build events to StackOne

Add the StackOne Native Webhook URL as a notification endpoint on every job that should send events. Jobs without the endpoint send nothing.

1

Retrieve StackOne Native Webhook URL

The Native Webhook URL is generated once an account has been linked.

  • Open the linked account in StackOne.
  • Copy the value from Native Webhook URL.
  • The URL contains a secret token that authenticates deliveries, so store it securely and do not share it.
2

Open the job configuration

Open each job that should send events to StackOne.

  • Open the job in Jenkins.
  • Click Configure.
Job page with the Configure link highlighted
3

Add a notification endpoint

Add an endpoint to the job’s notification settings.

  • Click Job Notifications.
  • Under Notification Endpoints, click Add Endpoint.
Job configuration with the Job Notifications section and the Add Endpoint button highlighted
4

Configure the endpoint

Point the endpoint at StackOne.

  • Set Format to JSON.
  • Set Protocol to HTTP.
  • Set Event to All Events.
  • Leave URL Source as Plain Text and paste the Native Webhook URL into URL.
  • Click Save.
  • Repeat these steps for each job that should send events.
Notification endpoint form with Format, Protocol, Event, URL and Save highlighted and the URL token masked

Available webhook events

The following Jenkins events can be enabled. Only events selected in StackOne are delivered; Jenkins sends every phase to the endpoint and StackOne ignores the ones that are not enabled.

1

Build events

Events for each phase of a build of a job that has the StackOne endpoint.

  • Build Queued (QUEUED) — Fired when a build starts running, carrying the time it entered the queue.
  • Build Started (STARTED) — Fired when a build starts running.
  • Build Completed (COMPLETED) — Fired when a build finishes running, with its result (SUCCESS, UNSTABLE, FAILURE, NOT_BUILT or ABORTED).
  • Build Finalized (FINALIZED) — Fired when Jenkins has fully written the build record after post-build steps, with the final result.
2

Verification

Lets a Pipeline confirm that a job is connected to StackOne.

  • Webhook Verification (NONE) — Fired when a Pipeline runs the notifyEndpoints step with phase NONE. It is acknowledged and no build event is created.

Delivery format

Details of how the Notification plugin delivers events to StackOne.

1

One request per build phase

Each build sends a separate JSON request for each phase, so a normal build produces four events. The phase is in build.phase and the result, once known, in build.status. The plugin does not retry failed deliveries unless retries are set on the endpoint, and it ignores the HTTP status that StackOne returns.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.