You can only have one DataBoundConstructor annotation i believe. I removed the table from the config.jelly
I renamed the method setGlobalConfigDataForSonarInstances to setListOfGlobalConfigData It looks like it is working now: [image: cascdoc.png] I was also able to export the casc sonarQualityGates: listOfGlobalConfigData: - maxWaitTime: 300000 name: "test" timeToWait: 10000 - maxWaitTime: 500000 name: "test2" timeToWait: 20000 I think perhaps I need to look at the naming convetion etc, listOfGlobalConfigData doesnt sound descriptive, perhaps its should be listOfSonarInstances, or maybe just sonarInstances Will also need to look into adding tests On Monday, August 19, 2024 at 4:54:17 PM UTC+1 m.wi...@sap.com wrote: > Took a look and tried things out: > > You also need a DataBoundConstructor for the noarg contructor of > GlobalConfig > > And create a method “setListOfGlobalConfigData” and annotate as > DataBoundSetter. > > Remove the DataBoundSetter from setGlobalConfigDataForSonarInstances > > > > The way of configuring with the GlobalConfigurationService might be a > problem with CasC > > > > Line 19 in GlobalConfig should be transient, it doesn’t contain data that > should be saved > > > > You can remove the wrapping table in config.jelly > > > > > > *From:* jenkin...@googlegroups.com <jenkin...@googlegroups.com> *On > Behalf Of *Kirk Fitzsimons > *Sent:* Montag, 19. August 2024 15:06 > *To:* Jenkins Developers <jenkin...@googlegroups.com> > *Subject:* Re: Adding casc support to plugin > > > > Thanks for the reply > > Apologies, but I am very new to this, I have pushed a change to my branch, > I must be missing something else > > Ensure GlobalConfigDataForSonarInstance extends Describable · > kirk-fitz/sonar-quality-gates-plugin@415ede3 (github.com) > <https://github.com/kirk-fitz/sonar-quality-gates-plugin/commit/415ede3b577fd7cc90b6ac0f8f122884d7074669> > > Kirk > > On Monday, August 19, 2024 at 11:48:52 AM UTC+1 m.wi...@sap.com wrote: > > The class GlobalConfigDataForSonarInstance must be a Describable > > See > https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/PLUGINS.md#step-2 > > > > *From:* jenkin...@googlegroups.com <jenkin...@googlegroups.com> *On > Behalf Of *Kirk Fitzsimons > *Sent:* Montag, 19. August 2024 12:34 > *To:* Jenkins Developers <jenkin...@googlegroups.com> > *Subject:* Adding casc support to plugin > > > > Hi, > > I am trying to add casc support to Sonar Quality Gates plugin, this is my > attempt. > > Try add casc · kirk-fitz/sonar-quality-gates-plugin@ea75469 (github.com) > <https://github.com/kirk-fitz/sonar-quality-gates-plugin/commit/ea754691d24cf309d33bbe207b610d43532ab6b1> > > I can see the root of the plugin config, but I am not getting any > properties, can someone help me identify what I am missing > > "sonarQualityGates": { > "additionalProperties": false, > "type": "object", > "properties": {} > }, > > Kirk > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/7132814d-69f0-4d35-ae2f-5aeb0e6e35fdn%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/7132814d-69f0-4d35-ae2f-5aeb0e6e35fdn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-de...@googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/7ebba756-7178-4769-b05c-7c2dcdfa523cn%40googlegroups.com > > <https://groups.google.com/d/msgid/jenkinsci-dev/7ebba756-7178-4769-b05c-7c2dcdfa523cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/fe6cc878-7030-4cf7-9348-5bd45752b0b0n%40googlegroups.com.