nuke-build / nuke

🏗 The AKEless Build System for C#/.NET
https://nuke.build
MIT License
3.07k stars 369 forks source link

Add possibility to set azure pipeline (build) name via attribute #1411

Open swimmesberger opened 3 months ago

swimmesberger commented 3 months ago

Description

See: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops for use-cases for custom azure build pipeline names. In yaml it can be set via the "name" property like so:

trigger:
  - main

name: '$(Date:yyyy.M.d).$(Rev:r)'

variables:
  - group: pipeline-variables

stages:
...

It would be nice to set it via the generation attribute too like so:

[AzurePipelines(
    AzurePipelinesImage.UbuntuLatest,
    InvokedTargets = [nameof(Test)],
    BuildName = "$(Date:yyyy.M.d).$(Rev:r)",
    TriggerBranchesInclude = ["master"],
    AutoGenerate = false
)]
public class Build : NukeBuild {
...
}

Usage Example

No response

Alternative

No response

Could you help with a pull-request?

No