Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use real buildType identifiers for buildSettings map in slackIntegration.json #135

Open
daywhirls opened this issue Nov 18, 2021 · 1 comment

Comments

@daywhirls
Copy link

daywhirls commented Nov 18, 2021

Ideally I would love for #32 to happen, but if it is not possible right now, then I may have a workaround suggestion that will allow users to programmatically apply the plugin to all build configurations.

I notice that the settings we apply to all build configurations are currently stored inside config/slackIntegration.json in the form of a buildSettings map:

"buildSettings":{
    "abcde":{
      "buildTypeId":"bt1",
...

Here it seems that each key is a random string of 5 letters that are not useful, and also buildTypeId is using some sort of internal build ID "bt" + x, where x is a number that corresponds to how many total build configurations there are. For example, if I have 2 total build configurations and each are using the plugin, the buildTypeIds are bt1 and bt2. There doesn't seem to be a way to figure out which build configuration ID actually corresponds to these "btX" shorthands being stored in the settings file.

My proposal:

  • Use the real Build configuration ID defined in the "General Settings" page for each build configuration to keep track of which build configurations are using the plugin.
  • Ensure the plugins get automatically set up on build configurations that exist in the settings file.

This way, your users can write a quick REST API script to get a list of every build configuration they desire, and then they can use this list to programmatically restructure their slackIntegration.json file to apply the plugin to every build configuration.

The end result would be that simply by programmatically adding every build configuration to the settings file, the Slack plugin is automatically added to each of these configurations. Again, #32 is a much better solution, but this suggestion feels like significantly less work and would be a quick win.

@alexkvak
Copy link
Owner

Thanks for the report. Yes, your problem is known and I'll try to implement #32 to make this workaround easier to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants