Hello, I'm writing a Cloud plugin for Jenkins. The plugin manages in-house resource management system and it dynamically build slaves on temporarily leased resources. The plugin extends Cloud (ClustersCloud extends Cloud) , Slave, RetentionStrategy etc... and in general, works as fine. It creates and destroys slaves as expected.
Now I want to add some fields to the Job - whether the Job should use the plugin to get slave or not and if so, for how long and other parameters (on top of the standard Labels mechanism). I've added the fields to the Job configuration page by extending JobProperty (ClustersJobProperty extends JobProperty) + some Jelly configuration. <https://lh3.googleusercontent.com/-WuPyWr0I-rU/U98u_4XADhI/AAAAAAAAAAM/NOwlMikYejw/s1600/Untitled.jpg> My question is - where and how should I use these fields? First I want to access the check-box 'ClustersJobProperty.useCute' and test whether I should call my Cloud to provision a slave or not at all. Should I do it inside ClustersCloud.canProvision? Or should I extend some other class and make sure to verify it even before it gets to the canProvision? In any case how to I access the ClustersJobProperty object of the job inside ClustersCloud.provision to get the additional info I need to complete the provision? How do I get the the current job that triggered the call to provision? Any advise? Thanks, Yoram -- 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/d/optout.
