How to find the Webhook to Jenkins for Bitbucket plugin configuration

お困りですか?

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

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

If for some reason the Webhook to Jenkins for Bitbucket plugin becomes unavailable in the web interface, customers may want to back up its configuration before reinstalling the plugin.

This article explains where and how this data can be retrieved.

Webhook to Jenkins for Bitbucket is a paid plugin. For issues caused by this plugin, please submit a Support Request to Appfire.

環境

Bitbucket Server/Data Center

ソリューション

  • The app settings are stored in the database tables STA_REPO_HOOK and STA_SHARED_LOB.
  • The following SQL query can be used for finding out the LOB_ID associated with that plugin:

    SELECT * 
    FROM sta_repo_hook 
    WHERE hook_key LIKE 'com.nerdwin15.stash-stash-webhook-jenkins%';
    
    id  repository_id  hook_key                                                          is_enabled  lob_id  project_id  
    --  -------------  ----------------------------------------------------------------  ----------  ------  ----------  
    22  1              com.nerdwin15.stash-stash-webhook-jenkins:jenkinsPostReceiveHook  true        122     (null)      

    Here we can see that LOB_ID=122, so we can run this SQL query as well in order to retrieve the plugin configuration:

    SELECT * 
    FROM sta_shared_lob 
    WHERE id = 122;
    
    id   lob_data                                                                                                                                                                                                                                                                                                                                                                                                                                      
    ---  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  
    122  {"jenkinsBase":"http://jenkins.example.com","jenkinsEndPointType":"com.nerdwin15.stash.webhook.notifier.GitPluginNotifier","cloneType":"http","mirrorCloneUrl":"undefined","ignoreCerts":true,"omitHashCode":true,"omitBranchName":true,"omitTriggerBuildButton":true,"omitBuildsPage":true,"ignoreCommitters":"fkraemer","ignoreAccessKeys":"","branchOptions":"","branchOptionsBranches":"branch1","disabledEvents":"","urlParameters":""}  

    As can be seen, the STA_SHARED_LOB table is the one that really contains the app settings.

  • A single SQL query can be used as well, by joining STA_REPO_HOOK and STA_SHARED_LOB via LOB_ID and retrieve only the LOB_DATA column which is the one that really contains the plugin settings:

    SELECT lob_data 
    FROM sta_shared_lob AS lob
    INNER JOIN sta_repo_hook AS hook ON lob.id = hook.lob_id
    WHERE hook.hook_key LIKE 'com.nerdwin15.stash-stash-webhook-jenkins%';
説明 How to find the Webhook to Jenkins for Bitbucket plugin configuration
製品Bitbucket

最終更新日 2022 年 11 月 9 日

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

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