Skip to content
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

Add pipeline templates #18

Merged
merged 9 commits into from May 5, 2021

Conversation

premun
Copy link
Collaborator

@premun premun commented May 4, 2021

Adds the possibility to add template: file.yml with parameters to any part of the pipeline.

Example:

Stages =
{
    new Stage("Build_Windows_NT", "Build Windows")
    {
        Jobs =
        {
            new Template<Job>("/eng/common/templates/jobs/jobs.yml")
            {
                Parameters =
                {
                    { "enableTelemetry", true },
                    { "helixRepo", "dotnet/xharness" },
                    { "SDLValidationParameters", new TemplateParameters
                        {
                            { "enable", false },
                            { "continueOnError", false },
                        }
                    }
                }
            }
        }
    },
}

which produces this YAML:

stages:
- name: Build_Windows_NT
  displayName: Build Windows
  dependsOn: []
  variables: []
  jobs:
  - template: /eng/common/templates/jobs/jobs.yml
    parameters:
      enableTelemetry: true
      helixRepo: dotnet/xharness
      SDLValidationParameters:
        enable: false
        continueOnError: false

@premun premun requested a review from mandel-macaque May 4, 2021 20:08
@mandel-macaque mandel-macaque merged commit 24f42bb into sharpliner:main May 5, 2021
@premun premun deleted the prvysoky/azdo-pipeline branch May 5, 2021 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants