Skip to content

Setting Up Azure Pipelines

Stephan T. Lavavej edited this page Apr 23, 2024 · 15 revisions

Pipeline

Fix Pipelines Not Running

  • Temporary fix:
    • vclibs / STL / Pipelines
    • Hover over each pipeline, click vertical ellipsis, Edit.
    • Click vertical ellipsis (in the upper-right corner), Settings.
    • If "Processing of new run requests" isn't already Enabled, select that and click Save.
  • Permanent fix:
    • If pipelines are being mysteriously Disabled, they probably need to be added to the C++ MSVC Validation service in Product Catalog.
    • You'll need a service admin to fix this - ask in the MSVC Engineering System And Operations channel in Teams.
  • To verify what's happening:
    • vclibs / STL / Pipelines
    • Hover over a pipeline, click vertical ellipsis, Edit.
    • Click vertical ellipsis (in the upper-right corner), Triggers.
    • Click the History tab. Look for MerlinBot changing the pipeline with a comment "Disabled due to missing inventory."
    • This comment also links to aka.ms/prodcatpipelinedisablement where you can learn more.

Teardown

  1. vclibs / STL / Pipelines
    • Hover over each pipeline, click vertical ellipsis, Delete.
    • Type the name of the pipeline to confirm.
  2. vclibs / STL / Settings / Service connections
    • Click "STL", click vertical ellipsis, Delete.

Setup

  • vclibs / STL / Pipelines
    • Click "+ New Pipeline".
    • In the fine print where it states "This pipeline creation experience supports only ADO git repositories", click "native Azure DevOps experience" since our repository is on GitHub.
    • Select GitHub.
    • Click the "My repositories" dropdown and change it to "All repositories".
    • Type microsoft/STL into the filter and wait for the repo to appear (this is slow). Select it.
    • Choose "Existing Azure Pipelines YAML file".
    • From the popup, select the appropriate branch and pathname to the pipeline YAML file in the repo, e.g., main and /azure-pipelines.yml.
    • This will display "Review your pipeline YAML" with the contents of azure-pipelines.yml.
    • Click "Run" which will display "Creating pipeline..." and will then start a CI build. (Alternatively, "Save" will create the pipeline without initiating a run.) The pipeline name will default to "microsoft.STL".
    • From the vertical ellipsis, select "Rename/Move" and choose an appropriate pipeline name, e.g., "STL-CI".
    • You will likely see an orange notification banner across the top of the window requiring you to "classify and/or assign the new pipeline". Click where it asks you to and classify appropriately. (Our pipelines are used for validation but don't produce shipped bits so they are "Non-production". The proper service tree leaf is "C++ STL Validation" - good luck finding it.)
    • If the pipeline should run for pull requests only after a maintainer requests it with a comment (this is the case for "STL-ASAN-CI", but not "STL-CI" as of this writing):
      • Edit
      • Click vertical ellipsis, Triggers.
      • Select "microsoft/STL" under "Pull Request Validation".
      • In the right pane, under "Comments" activate the "Require a team member's comment before building a pull request" checkbox.
      • Radio buttons appear below, defaulting to "On all pull requests" which you probably want.
      • Click "Save and queue" from the menu across the top pane, or drop it down and select "Save".
  • In README.md, update the [Meow-link] links, as the definitionIds will have changed.