azure-vm-agents-plugin
                                
                                 azure-vm-agents-plugin copied to clipboard
                                
                                    azure-vm-agents-plugin copied to clipboard
                            
                            
                            
                        Support for adding Max_Virtual_Machines_Limit at agent template level
What feature do you want to see added? - "Max_Virtual_Machines_Limit" at the agent template level via groovy.
I need to add "Max_Virtual_Machines_Limit" at the agent template level.
I am configuring the VM template using groovy script but I could not find an appropriate "with" function to update this field via groovy. In absence of this parameter being provided by me, the "Max_Virtual_Machines_Limit" is updated to "0", which as per https://github.com/jenkinsci/azure-vm-agents-plugin/blob/6dcc3c382d91365245862b5e7bd0314d3ce30176/src/main/resources/com/microsoft/azure/vmagent/AzureVMAgentTemplate/help-maximumDeploymentSize.html#L5C14-L5C15 indicates "no limit".
But I would like to control this field at agent "template level". How can I do this via groovy? If this is not possible can I request a function which helps in updating this field via groovy? Thanks.
Upstream changes
No response
The configuration as code plugin is the recommended method to configure this plugin through code..
I would accept a pull request to expose it in groovy but no plans to do myself as there are better alternatives.
https://github.com/jenkinsci/azure-vm-agents-plugin#configure-vm-template-using-configuration-as-code-plugin
Given no further interest closing this, please use the recommended approach the jenkins configuration as code plugin