I'm working though legal to get the extension and fixes to buildflow approved - and I can't share until that happens.
However I think I have found the cause (and confusion). I tried using def concExt = extension.bogus-wibble and my extension is called with "bogus" as the extension name not "bogus-wibble". I can only presume that groovy is treating the extension.foo-bar-wibble as extension.foo subtract bar subtract wibble. and that the documentation on the BuildFlowDSLExtension to use the artifact id such as "external-resource-dispatcher" is wrong. simply changing my extension name from build-flow-concurrent-extensions to buildflowconcurrentextensions makes the code and DSL work. Not sure if this is intended or not - but I can happily test my plugin now! On Friday, 16 August 2013 17:34:09 UTC+1, nicolas de loof wrote: > > Can you publish this on some github repo so I can check ? > (or share in private => [email protected] <javascript:> / > github:ndeloof) > > > 2013/8/16 teilo <[email protected] <javascript:>> > >> Hi all, >> >> I'm attempting to write a buildflow extension. >> >> However as soon as I attempt to register the extension (not even use it) >> all existing flow functionality breaks. >> >> e.g. >> the following DSL: >> >> def concExt = extension.build-flow-concurrent-extensions >> build("job1", param: build.number) >> build("job2", param: build.number) >> >> >> produces the following error: >> >> ERROR: Failed to run DSL Script, java.lang.UnsupportedOperationException: >> No such extension available: build >> >> >> As far as I can tell I am doing this the right way - in my >> BuildFlowDSLExtension.createExtension(String, FlowDelegate) I have a check >> >> >> if ("build-flow-concurrent-extensions".equals(s)) { >> return new MyDSL(flowDelegate); >> } >> return null; >> >> >> And for some reason this is called with "build" as the String. >> >> Any ideas where I am going wrong (I can't yet release the full code :-( ) >> >> /James >> >> -- >> 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 [email protected] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
