-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Azure Devops self-hosted agents #1173
Comments
Hi,
However, this is (currently) not supported for Azure Dev Ops on-premise Server (2022)!
|
Same here! This is a big problem! Since it's already here, it's a legacy constraint. Can I suggest using source generators to generate the enum so the current list will not change This makes sense as those images are private. @matkoch is this possible? |
Description
I would really like to see support for Self-hosted agents in addition to the current Microsoft hosted agents.
I am aware that a similar issue was raised some time ago, but in the previous issue it was more about on-prem agents while I think it is really about supporting the more general concept of self-hosted agents, which may be on-prem or anywhere else.
It seems that the current implementation of AzurePipelines in nuke is only for Microsoft hosted agents.
As far as I know, the generated yaml only works when using Microsoft hosted agents and the AzurePipelines attribute can't be configured so that the yaml file required for a Self-hosted agent is generated.
Furthermore the generated yaml is assuming that all jobs/targets should go into all stages, and each stage is linked to a specific vmImage.
E.g. adding an AzurePipelines attribute like this will produce two almost identical stages including all targes as jobs (only difference would be the vm image):
Producing a yaml wich would look like this:
Running all targets (jobs) on all images may make sense when all agents have the same set of installed tools like the Microsoft hosted agents, but when using self hosted agents this may not make as much sense.
When using self hosted agents we should not be specifying the
vmImage
property of thepool
, but rather the name of thepool
that we want to use.When self hosted agents they may also have different capabilities and we need to control what
pool
is used for a specific target/job.E.g. the test targets/jobs may require different tools than what is needed for the build job.
I suggest to introduce a new
AzureStageAttribute
which could accept either a stage name or the image.As we can have any combination of Stages running on either Microsoft hosted and some on self-hosted I think we should allow for multiple
AzureStageAttributes
on the Build object.The reason for this is that attempting to support both in a single
AzurePipelinesAttribute
as was done in the previous attempt to solve issue 1019, may become a bit "not a great implementation".This would require a change in
BuildServerConfigurationGenerationAttributeBase
as well.The attribute would be used when generating the
pool
property in the yaml.We would set either
vmImage
orname
depending on what was passed to theAzureStageAttribute
.vmImage
would be used for Microhost hosted agents as today,name
would be used for self-hosted agents.That is we would could have two constructors like this:
There are of course some details that need to be ironed out surrounding this, but before investing too much into this I would like to know what you think about the idea?
Is this something you would consider including if I make a PR for this?
This would still not fix the need to control the pool used for which target/job, but I am thinking that would be a possible future step (possibly adding a
AzureJobAttribute
to set the pool on a job) , if you are at all agreeing to allow for some improvements in this area?Usage Example
Generated yaml:
Alternative
No response
Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered: