Programmatically change Bit-bucket plugin settings.

huangapple go评论138阅读模式
英文:

Programmatically change Bit-bucket plugin settings

问题

我想使用Ansible更改Bitbucket插件(具体来说是外观设置)的设置。我在Atlassian论坛上提出了这个问题,但没有结果。由于Atlassian工具可能以类似的方式存储其配置信息,关于套件中的其他工具(如Jira)的信息可能会有所帮助。

是否有我可以使用的REST API?可以修改的配置文件吗?可以更改的数据库行吗?

我怀疑我需要更改的信息存储在数据库中,我将开始朝这个方向探索。

英文:

I would like to change the settings for a bit-bucket plugin (Specifically look-and-feel) with Ansible. I asked this question in the Atlassian forum with no results. Since the Atlassian tools probably store their config information similarly, information about the other tools in the suite like Jira may be helpful.

Is there a REST API I could use? A config file I can modify? Database row I can change?

I suspect the information I need to change is stored in the database and I am going to start exploring in that direction.

答案1

得分: 0

数据库中有一张名为plugin_settings的表。它包含键值配置设置。
对于look and feel插件,有4行数据。架构和我的数据如下-

命名空间                    键名                       键值                         id
bitbucket.global.settings    look-and-feel:HEADER_IMAGE   <64位编码的图像>         74
bitbucket.global.settings    look-and-feel:MODIFIED_TIME  <看起来像时代的时间>    70
bitbucket.global.settings    look-and-feel:COLOR_MAP      #java.util.Map            73
                                                            customThemePrimaryColour#403294  75
                                                            customThemeHeaderColour#403294
bitbucket.global.settings    look-and-feel:FAVICON_IMAGE  <64位编码的图像>

我尚未确定REST API是否允许我修改这些值,但至少我将能够修改表中的行。

如果您的用例与我的类似,似乎最简单的方法是暂时安装和配置BB,然后从表中提取值并将它们放入您的ansible配置中;特别是对于64位编码的图像。

英文:

There is a table in the database called plugin_settings. It's contains key-value config settings.
For the look and feel plugin there were 4 rows. The schema and my data looks like this-

namespace                   key_name					    key_value    						id
bitbucket.global.settings	look-and-feel:HEADER_IMAGE		<64 bit encoded image>				74
bitbucket.global.settings	look-and-feel:MODIFIED_TIME		<Looks like an epoch time>			70
bitbucket.global.settings	look-and-feel:COLOR_MAP			#java.util.Map						73
															customThemePrimaryColour#403294 	 75
															customThemeHeaderColour#403294
bitbucket.global.settings	look-and-feel:FAVICON_IMAGE		<64 bit encoded image>

I haven't determined yet if the REST API will allow me to modify these values but at the very least I
will be able to modify the rows in the table.

If your use case is similar to mine, it looks like the easiest thing to do is install and configure BB
somewhere temporarily then pull the values out of the table and put them in your ansible config;
especially for the 64 bit encoded images.

huangapple
  • 本文由 发表于 2020年1月7日 00:33:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615708.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定