Webhooks
Send web requests to any external systems
You can use Webhooks to send web requests to any external systems (ex : Jira, Confluence, Bamboo, Jenkins, Gitlab, etc.) in response to changes performed in Golive or in Jira.
For example, you may want to automatically trigger a deployment job:
  • when the deployed version of an environment is updated in Golive
  • when the status of an environment is changed
  • when a new issue is linked to an Environment
  • ...
Using Webhooks means that your external tools do not have to periodically poll Jira (via the REST API) to determine whether a change has occurred in Golive.

Create a new Webhook

Open Automations page and create a new Automation of type "Webhook" to start configuration of a new webhook:

Configure the Endpoint

In order to call an external HTTP system, you have to configure its endpoint and how it should be called:
  • Type of Request (POST, GET, PUT, DELETE,...)
  • URL to send the request to
  • Headers (opt): useful to send authentication information, token, ... required by your target system (ex: basic authentication)

Default Payloads (body)

Golive sends standard JSON payloads as body of POST, UPDATE and PUT requests. Example of payload sent when "Environment Updated" event is triggered:
1
{
2
"timestamp": 1616408079845,
3
"event": "environment:updated",
4
"environment": {
5
"id": 11,
6
"application": {
7
"id": 21,
8
"name": "AppTest",
9
"deploymentAttributes": []
10
},
11
"category": {
12
"id": 31,
13
"name": "CategoryTest",
14
"order": 1
15
},
16
"environmentPermissionScheme": {
17
"id": 41,
18
"name": "PermSchemeTest",
19
"global": false
20
},
21
"status": {
22
"id": 51,
23
"name": "Up",
24
"description": "StatusDescription",
25
"color": "BLUE",
26
"order": 1
27
},
28
"url": "http://fakeurl",
29
"urlHtml": "<a href=\"http://fakeurl\" target=\"_blank\">http://fakeurl</a>",
30
"deployment": {
31
"deploymentId": 1,
32
"id": 1,
33
"versionName": "VersionName",
34
"versionId": "123",
35
"deployedTime": 1616408079845,
36
"categoryId": 31,
37
"categoryName": "CategoryTest",
38
"applicationId": 21,
39
"applicationName": "AppTest",
40
"endTime": 1616408079845,
41
"duration": 1000,
42
"buildNumber": "123",
43
"description": "DeployedDescription",
44
"attributes": {
45
"Parameter": "ParameterValue"
46
}
47
},
48
"attributes": {
49
"Data Backup": "Data Backup Value",
50
"Owner": "OwnerValue"
51
}
52
},
53
"user": {
54
"self": "https://jira-staging.apwide.com/rest/api/2/user?username=admin",
55
"name": "admin",
56
"key": "admin",
57
"emailAddress": "[email protected]",
58
"avatarUrls": {
59
"48x48": "https://jira-staging.apwide.com/secure/useravatar?ownerId=admin&avatarId=10741",
60
"24x24": "https://jira-staging.apwide.com/secure/useravatar?size=small&ownerId=admin&avatarId=10741",
61
"16x16": "https://jira-staging.apwide.com/secure/useravatar?size=xsmall&ownerId=admin&avatarId=10741",
62
"32x32": "https://jira-staging.apwide.com/secure/useravatar?size=medium&ownerId=admin&avatarId=10741"
63
},
64
"displayName": "Thomas Anderson",
65
"active": true,
66
"timeZone": "Europe/Zurich"
67
},
68
"environmentChanges": [
69
{
70
"fieldType": "URL",
71
"field": "URL",
72
"from": "http://fake.mycompany.com",
73
"fromString": "http://fake.mycompany.com",
74
"to": "http://fake.new.mycompany.com",
75
"toString": "http://fake.new.mycompany.com"
76
},
77
{
78
"fieldType": "Owner",
79
"field": "Owner",
80
"from": "John Smith",
81
"fromString": "John Smith",
82
"to": "Jane Doe",
83
"toString": "Jane Doe"
84
}
85
]
86
}
Copied!

Custom Payloads (body)

Enable Custom Payload toggle to completely customize your payload to fit the format required by your external system. It can be any type of XML, TXT, CSV, YAML, JSON,... or other proprietary formats.
Thanks to the embedded editor, you can insert dynamic content into your payloads using expressions, conditions and loops (Pebble Templates), for example:
1
{
2
execution: "{{timestamp}}",
3
event: "{{webhookEvent}}",
4
environmentName: "{{environment.application.name}} {{environment.category.name}}",
5
{% if environment.status is not null %}
6
status: "{{environment.status.name}}",
7
{% endif %}
8
{% if environment.deployment is not null %}
9
status: "{{environment.deployment.versionName}}",
10
{% endif %}
11
attributes: [
12
{% for attribute in environment.attributes %}
13
"{{attribute.key}}": "{{attribute.value}}"
14
{% endfor %}
15
]
16
}
Copied!

Test your Webhooks

You can inspect and debug the payloads, requests, responses,... accessing the execution logs in Automations Page as described here. It will greatly help you to understand what may be changed to fix integration issues.
There are also free and very useful online tools available to help you test/configure your Webhooks. One of them is RequestBin.com :
RequestBin.com — A modern request bin to collect, inspect and debug HTTP requests and webhooks
pipedream
It will generate a unique URL you can use to configure your Webhooks. You can then easily visualize what has been sent by Jira accessing this unique URL with your browser.

Example:

Example: trigger a Jenkins Job

Learn how it is easy to trigger Jenkins jobs using Golive Webhooks:
Trigger Jenkins Job Remotely using Jenkins API
Medium
Use our Golive Jenkins Shared Lib to call back the Golive REST API in order to update back your environments from your Jenkins pipelines
Last modified 9mo ago