azure-vm-agents-plugin icon indicating copy to clipboard operation
azure-vm-agents-plugin copied to clipboard

Support for adding Max_Virtual_Machines_Limit at agent template level

Open jigyasapriyadarshini opened this issue 2 years ago • 1 comments

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.

image

Upstream changes

No response

jigyasapriyadarshini avatar Jun 26 '23 07:06 jigyasapriyadarshini

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

timja avatar Jun 26 '23 08:06 timja

Given no further interest closing this, please use the recommended approach the jenkins configuration as code plugin

timja avatar Nov 24 '24 19:11 timja