Setting up Bitbucket Cloud Webhook for Fisheye

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

要約

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.

手順

  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

最終更新日 2017 年 11 月 10 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.