In Flashduty On-call
- In the Flashduty console, go to Integration Center → Change Events
- Select Jenkins and enter an integration name
- To assign changes to specific channels, add rules under the integration’s Routes that match labels such as
job - Click Save and copy the generated Push URL
Configure Jenkins
1
Check the Jenkins URL
Go to Manage Jenkins → System and make sure Jenkins URL under Jenkins Location is set to the address of your Jenkins. Without it, notifications carry no build link, Flashduty cannot identify the build, and the delivery is rejected.
2
Install the Notification plugin
Go to Manage Jenkins → Plugins → Available plugins, search for Notification, and install it. You need Jenkins administrator permission.The plugin also needs the JUnit plugin, which Jenkins does not install with it. If Manage Jenkins → Plugins → Installed plugins does not list JUnit, install it too. Without JUnit, no notification is sent and the build log shows
NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction.3
Add the endpoint to a deployment job
- Open the deployment job, click Configure, find the Job Notifications section, and click Add Endpoint
- Format: select
JSON - Protocol: select
HTTP - Event: select
All Events, so Flashduty sees the build both start and finish - URL Source: select
Credentials Store, save the complete Flashduty integration Push URL as a Secret text credential, and select that credential in URL. WithPlain Text, the plugin prints the full Push URL, includingintegration_key, in the log of every build - Keep Branch at the default
.*, leave the other options at their defaults, and click Save
properties. You can generate the code on the pipeline’s Pipeline Syntax → Snippet Generator page by selecting properties: Set job properties.4
Run a build
Run the job once; the change appears in the Flashduty change list. The Notification plugin has no test button. If Jenkins cannot reach Flashduty, the build log shows
Failed to notify endpoint; the plugin does not check the response, so a delivery that Flashduty rejects is not shown in Jenkins.What one change is
Each build is one change. Its change key (change_key) is
<full build URL>#<queue ID>, for example https://jenkins.example.com/job/deploy/18/#4711.
- Every phase of one build updates the same change
- Two builds of the same job are two changes
- When a job is deleted and recreated and its build numbers restart at 1, the queue IDs differ, so new builds are not merged into old ones
- When several Jenkins instances send to the same integration, their build URLs differ, so their builds are kept apart
Status mapping
Done, Failed, and Canceled are end states; Flashduty records the change’s end time when one arrives. COMPLETED means the build steps have finished; FINALIZED means post-build actions (such as archiving artifacts) have finished too. Both carry the same result.
UNSTABLE means every build step ran, but tests or quality checks reported problems, so it is recorded as Done; use the
result label to filter these changes.
The plugin sends QUEUED only when the build starts, never while the build waits in the queue. Flashduty accepts QUEUED without recording it, so a change appears when its build starts.
A notifyEndpoints step in a pipeline with phase set to NONE is accepted without creating a change.
Change content
Labels can be used in routes and to filter the change list:
branch and commit are sent only by freestyle jobs that use Git under Source Code Management. A Pipeline job that checks out with the git step does not send them. A notification sent when the build starts can carry the values from before this build’s checkout, so rely on the values at the end of the build. Route on job; otherwise the early and late events of one build can land in different channels.
FAQ
Why are no changes arriving?
Why are no changes arriving?
- Make sure Format is
JSONand Protocol isHTTP - Make sure Jenkins URL is set under Manage Jenkins → System
- Look for
Notifying endpointorFailed to notify endpointin the build log NoClassDefFoundError: hudson/tasks/test/AbstractTestResultActionin the build log means the JUnit plugin is missing. Install it- When Branch is not
.*, only builds that have aBRANCH_NAMEenvironment variable matching it send notifications
Why does one build have two end events?
Why does one build have two end events?
The plugin sends one notification when the build completes (COMPLETED) and another when post-build actions finish (FINALIZED). Both carry the same result, so the change status does not change. When both arrive within the same second, the second one is not recorded. To receive only one, set Event to
Job Finalized, but then the running phase is not shown.Which deliveries does Flashduty reject?
Which deliveries does Flashduty reject?
Flashduty rejects a delivery in these cases:
build.full_url is missing: the Jenkins URL is not configuredbuild.queue_id is missing: the payload has no queue ID. Make sure the delivery comes from the Notification pluginbuild.status is missing: an end phase arrived without a build result, usually from a pipeline callingnotifyEndpoints(phase: 'COMPLETED')or'FINALIZED'before the result is setmust use Format JSON: the endpoint’s Format isXMLunsupported build.phaseorunsupported build.status: Flashduty received a phase or result it does not support yet. Contact us