How to find the Webhook to Jenkins for Bitbucket plugin configuration
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
If for some reason the Webhook to Jenkins for Bitbucket app 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.
Solution
The app settings are stored in the database tables
STA_REPO_HOOK
andSTA_SHARED_LOB
.The following SQL query can be used for finding out the
LOB_ID
associated with that plugin:1 2 3 4 5 6 7
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:1 2 3 4 5 6 7
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
andSTA_SHARED_LOB
viaLOB_ID
and retrieve only theLOB_DATA
column which is the one that really contains the plugin settings:1 2 3 4
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%';
Was this helpful?