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

Support init scripts from GitHub repositories

Open bsloan-icl opened this issue 2 months ago • 1 comments

What feature do you want to see added?

Currently, it's possible to specify an init script via the Jenkins UI (or CasC). This works fine but it would be good if users could specify an init script from a GitHub repository as well. This is especially useful when the same init script is used outside of Jenkins to configure other VMs.

To give an example, we have an init script that is used to install tools on CI/CD agents (Jenkins, GitHub, Azure DevOps etc.). This init script is consumed by Azure VMs (Linux and Windows) using the CustomScript extension. In the CustomScript extension it's possible to use a GitHub repostiory as the fileUris.

My understanding of the current plugin is that it takes the init script from the UI, saves it to Azure blob storage and then uses this value as the fileUris in the CustomScript extension settings. If a user specifies a init script from a GitHub repository, the plugin could use this value as the fileUris instead. Alternatively, it could download the init script from GitHub and upload it to Azure blob storage. It can then be consumed via the CustomScript extension.

I think the later approach would be better as it could support private repositories as well (which require authentication). If using an init script from a private repository, users could specify a Jenkins credential to use via the UI. The plugin could then use this credential to authenticate against GitHub and store the init script in Azure blob storage.

Upstream changes

No response

Are you interested in contributing this feature?

Happy to contribute to user testing and potentially development (depending how complex the changes are).

bsloan-icl avatar Oct 01 '25 08:10 bsloan-icl

Sounds reasonable, somewhat related to https://github.com/jenkinsci/azure-vm-agents-plugin/issues/252

timja avatar Oct 01 '25 09:10 timja