Setting up Bitbucket Cloud Webhook for Fisheye

Still need help?

The Atlassian Community is here for you.

Ask the community

Summary

Since Fisheye's REST API Token requires Request Headers which is not supported by Bitbucket's Webhook, you would require generating a User Token and add it as part of the Webhook URL.

Steps

  1. Get Fisheye's User token by running the following command:

    curl -X POST --header 'content-type: application/x-www-form-urlencoded' --data 'userName=<Your_Username>&password=<Your_password>' --url <Your_URL>:<PORT></optional CONTEXT>/rest-service-fecru/auth/login
    eg. curl -X POST --header 'content-type: application/x-www-form-urlencoded' --data 'userName=UserA&password=MyPassword' --url http://hostname:8060/fecru/rest-service-fecru/auth/login

    (info) It should return a similar output  ->  {"token":"<username>:2:73c6729f7f5941de6841eca87860dfa0"}

    Documentation: Fisheye Crucible REST API


  2. With the token received from the API, you can add the following URL to your Bitbucket's Webhook's URL then select your preferred triggers to proceed:

    <Your_URL>:<PORT></optional CONTEXT>/rest-service-fecru/admin/repositories-v1/<Your_Repo_Name>/scan?FEAUTH=<Your_User_Token>
    eg. http://hostname:8060/fecru/rest-service-fecru/admin/repositories-v1/ronc/scan?FEAUTH=admin:2:73c6729f7f5941de6841eca87860dfa0

    (warning) Please ensure that your URL is publicly accessible before adding to your Repository's Webhook

    Documentation: Authenticating REST Request

Last modified on Nov 10, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.