{"_id":"590a04f4ed80861900cbc766","user":"55b2d5626862a10d00887af9","category":{"_id":"590a04f3ed80861900cbc73e","project":"55b2d5baa74a380d00e290c4","version":"590a04f2ed80861900cbc737","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-11-14T01:14:16.514Z","from_sync":false,"order":6,"slug":"webhooks","title":"Webhooks"},"parentDoc":null,"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"__v":0,"project":"55b2d5baa74a380d00e290c4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-02T17:07:13.529Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"A webhook notifies buddybuild of code changes you make to your repo. Whenever a new change is pushed to Bitbucket Server, buddybuild will automatically kick off a new build - ensuring you have up-to-date build status and your testers have the very latest builds.\n\n**Step 1: Copy the webhook url from buddybuild**\nOn the Builds page, in the red banner at the top of the page, click on **Resolve this issue.**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/1fe12bc-Webhooks_-_resolve_banner.png\",\n        \"Webhooks - resolve banner.png\",\n        1500,\n        298,\n        \"#f8403f\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIn the dialog box that appears, **select and copy the webhook URL.** This URL is specific to your app and will be used to identify your app when sending webhooks from Bitbucket Server.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4862e51-Webhooks_-_modal.png\",\n        \"Webhooks - modal.png\",\n        1500,\n        838,\n        \"#535663\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n**Step 2: Add a new hook if the Web Post Hooks Plugin is not already installed **\nIn Bitbucket Server, navigate to the repo that contains your app. In the left navigation pane click **Settings**, then click on **Hooks**.\n\nBitbucket Server provides a plugin called *Post-Receive WebHooks*, which is listed in the *Post receive* section of the *Hooks* page. If the *Post-Receive WebHooks* plugin has already been installed then you can skip ahead to **Step 5**. If the *Post-Receive WebHooks* plugin has not listed, then you can add the plugin by clicking on the **Add hook** button.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ycavU4lNTfK0xvegCWld_step1.png\",\n        \"step1.png\",\n        \"2106\",\n        \"1196\",\n        \"#2f5073\",\n        \"\"\n      ],\n      \"sizing\": \"full\",\n      \"border\": false\n    }\n  ]\n}\n[/block]\n**Step 3: Select search to visit the Altassian Marketplace**\nThe Atlassian Marketplace contains hundreds of useful plugins for development. Click **Search** to visit the marketplace.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/bj2WveIQQeJenIszs1sd_step2.png\",\n        \"step2.png\",\n        \"2105\",\n        \"1198\",\n        \"#2e5174\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n**Step 4: Install the Web Post Hooks Plugin**\nSearch for the *Bitbucket Server Web Post Hooks Plugin*. Then click **Install**.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Do not use \\\"Http Request Post Receive Hook\\\"\",\n  \"body\": \"Be careful not to choose the *Http Request Post Receive Hook* as this is not compatible with buddybuild.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/GncNEgqfTuiIehpUjyY3_install.png\",\n        \"install.png\",\n        \"2560\",\n        \"1218\",\n        \"#2a5178\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n**Step 5: Configure the Post-Receive WebHooks**\nFrom your repository settings page, select the **Post-Receive WebHooks** plugin to configure the post receive events for buddybuild.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Do not use \\\"Http Request Post Receive Hook\\\"\",\n  \"body\": \"Be careful not to select the *Http Request Post Receive Hook* as this is not compatible with buddybuild.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/cTMRY03IRnyHBaDZhU0c_configure.png\",\n        \"configure.png\",\n        \"2560\",\n        \"1238\",\n        \"#2e5275\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n**Step 6: Enter the buddybuild webhook url**\nEnter the buddybuild webhook url that you copied from Step 1. Then click **Enable** to close the webhook editor dialog and enable. The next time that you push code code to your repository buddybuild will create a build for your app. Please remember that you will need to install a separate webhook for every app in buddybuild.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/NiLPvRUgTl2QfXQsFxxn_edit.png\",\n        \"edit.png\",\n        \"2560\",\n        \"1276\",\n        \"#182d41\",\n        \"\"\n      ],\n      \"border\": false,\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"adding-a-bitbucket-server-webhook","type":"basic","title":"Adding a Bitbucket Server Webhook"}

Adding a Bitbucket Server Webhook


A webhook notifies buddybuild of code changes you make to your repo. Whenever a new change is pushed to Bitbucket Server, buddybuild will automatically kick off a new build - ensuring you have up-to-date build status and your testers have the very latest builds. **Step 1: Copy the webhook url from buddybuild** On the Builds page, in the red banner at the top of the page, click on **Resolve this issue.** [block:image] { "images": [ { "image": [ "https://files.readme.io/1fe12bc-Webhooks_-_resolve_banner.png", "Webhooks - resolve banner.png", 1500, 298, "#f8403f" ], "sizing": "full" } ] } [/block] In the dialog box that appears, **select and copy the webhook URL.** This URL is specific to your app and will be used to identify your app when sending webhooks from Bitbucket Server. [block:image] { "images": [ { "image": [ "https://files.readme.io/4862e51-Webhooks_-_modal.png", "Webhooks - modal.png", 1500, 838, "#535663" ], "sizing": "full" } ] } [/block] **Step 2: Add a new hook if the Web Post Hooks Plugin is not already installed ** In Bitbucket Server, navigate to the repo that contains your app. In the left navigation pane click **Settings**, then click on **Hooks**. Bitbucket Server provides a plugin called *Post-Receive WebHooks*, which is listed in the *Post receive* section of the *Hooks* page. If the *Post-Receive WebHooks* plugin has already been installed then you can skip ahead to **Step 5**. If the *Post-Receive WebHooks* plugin has not listed, then you can add the plugin by clicking on the **Add hook** button. [block:image] { "images": [ { "image": [ "https://files.readme.io/ycavU4lNTfK0xvegCWld_step1.png", "step1.png", "2106", "1196", "#2f5073", "" ], "sizing": "full", "border": false } ] } [/block] **Step 3: Select search to visit the Altassian Marketplace** The Atlassian Marketplace contains hundreds of useful plugins for development. Click **Search** to visit the marketplace. [block:image] { "images": [ { "image": [ "https://files.readme.io/bj2WveIQQeJenIszs1sd_step2.png", "step2.png", "2105", "1198", "#2e5174", "" ], "sizing": "full" } ] } [/block] **Step 4: Install the Web Post Hooks Plugin** Search for the *Bitbucket Server Web Post Hooks Plugin*. Then click **Install**. [block:callout] { "type": "warning", "title": "Do not use \"Http Request Post Receive Hook\"", "body": "Be careful not to choose the *Http Request Post Receive Hook* as this is not compatible with buddybuild." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/GncNEgqfTuiIehpUjyY3_install.png", "install.png", "2560", "1218", "#2a5178", "" ], "sizing": "full" } ] } [/block] **Step 5: Configure the Post-Receive WebHooks** From your repository settings page, select the **Post-Receive WebHooks** plugin to configure the post receive events for buddybuild. [block:callout] { "type": "warning", "title": "Do not use \"Http Request Post Receive Hook\"", "body": "Be careful not to select the *Http Request Post Receive Hook* as this is not compatible with buddybuild." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/cTMRY03IRnyHBaDZhU0c_configure.png", "configure.png", "2560", "1238", "#2e5275", "" ], "sizing": "full" } ] } [/block] **Step 6: Enter the buddybuild webhook url** Enter the buddybuild webhook url that you copied from Step 1. Then click **Enable** to close the webhook editor dialog and enable. The next time that you push code code to your repository buddybuild will create a build for your app. Please remember that you will need to install a separate webhook for every app in buddybuild. [block:image] { "images": [ { "image": [ "https://files.readme.io/NiLPvRUgTl2QfXQsFxxn_edit.png", "edit.png", "2560", "1276", "#182d41", "" ], "border": false, "sizing": "full" } ] } [/block]