Skip to content

Setting Up Azure Pipelines

Stephan T. Lavavej edited this page Mar 25, 2022 · 16 revisions

Pipeline

Teardown

  1. vclibs / STL / Pipelines
    • Hover over "microsoft.STL", 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 "Create Pipeline".
    • 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.
    • 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.
  • In README.md, update the [Pipelines] link, as the definitionId will have changed.

Azure Resource Manager Service Connection

Teardown

Setup

  • vclibs / STL / Settings / Service connections
    • Click "New service connection".
    • Select Azure Resource Manager, click Next.
    • Ensure that "Service principal (automatic)" is selected by default as the authentication method (it is marked as "Recommended"), click Next.
    • Ensure that "Scope level" is set to "Subscription" by default.
    • Select CPP_STL_GitHub as the Subscription.
    • Leave "Resource group" empty.
      • The documentation says: "Leave empty to allow users to access all resources defined within the subscription".
    • Set the "Service connection name" to "CPP_STL_GitHub Service Connection".
    • You can record anything in "Description (optional)", e.g. "Created YYYY-MM-DD."
    • Check the checkbox that says "Grant access permission to all pipelines."
    • Click Save.

Reconnect

  • vclibs / STL / Settings / Agent pools
    • Click the current pool.
    • Click the Settings tab.
    • Under "Azure subscription settings", click Edit.
    • For "Azure subscription", select "CPP_STL_GitHub Service Connection"
    • For "Virtual machine scale set", select the appropriate VMSS for this pool.
    • Click Save.

See You In Two Years

Currently, this credential is created with a 2-year expiration date. We last recreated this service connection on 2022-03-25 and it is due to expire on 2024-03-25. It may be possible to renew shortly before expiration without these teardown/setup steps - we'll need to try that.

Clone this wiki locally