Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/agents/SplitADOPipelines.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tools: ['vscode', 'execute', 'read', 'agent', 'edit', 'search', 'todo']

This agent will implement and restructure the repository's existing ADO pipelines into Official and NonOfficial pipelines.

A repository will have under the ./pipelines directory a series of yaml files that define the ADO pipelines for the repository.
A repository will have under the .pipelines directory a series of yaml files that define the ADO pipelines for the repository.

First confirm if the pipelines are using a toggle switch for Official and NonOfficial. This will look something like this

Expand All @@ -31,17 +31,17 @@ This is an indicator that this work needs to be done. This toggle switch is no l

For each pipeline file that uses the toggle switch pattern (e.g., `PowerShell-Packages.yml`):

1. Create a `./pipelines/templates` directory if it doesn't exist
2. Extract the **variables section** into `./pipelines/templates/PowerShell-Packages-Variables.yml`
3. Extract the **stages section** into `./pipelines/templates/PowerShell-Packages-Stages.yml`
1. Create a `.pipelines/templates` directory if it doesn't exist
2. Extract the **variables section** into `.pipelines/templates/PowerShell-Packages-Variables.yml`
3. Extract the **stages section** into `.pipelines/templates/PowerShell-Packages-Stages.yml`

**IMPORTANT**: Only extract the `variables:` and `stages:` sections. All other sections (parameters, resources, extends, etc.) remain in the pipeline files.

### Step 2: Create Official Pipeline (In-Place Refactoring)

The original toggle-based file becomes the Official pipeline:

1. **Keep the file in its original location** (e.g., `./pipelines/PowerShell-Packages.yml` stays where it is)
1. **Keep the file in its original location** (e.g., `.pipelines/PowerShell-Packages.yml` stays where it is)
2. Remove the toggle switch parameter (`templateFile` parameter)
3. Hard-code the Official template reference:
```yaml
Expand All @@ -61,8 +61,8 @@ The original toggle-based file becomes the Official pipeline:

### Step 3: Create NonOfficial Pipeline

1. Create `./pipelines/NonOfficial` directory if it doesn't exist
2. Create the NonOfficial pipeline file (e.g., `./pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml`)
1. Create `.pipelines/NonOfficial` directory if it doesn't exist
2. Create the NonOfficial pipeline file (e.g., `.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml`)
3. Copy the structure from the refactored Official pipeline
4. Hard-code the NonOfficial template reference:
```yaml
Expand Down Expand Up @@ -124,7 +124,7 @@ Then you must configure the `ob_release_environment` parameter when referencing

#### Official Pipeline Configuration

In the Official pipeline (e.g., `./pipelines/PowerShell-Packages.yml`):
In the Official pipeline (e.g., `.pipelines/PowerShell-Packages.yml`):

```yaml
stages:
Expand All @@ -135,7 +135,7 @@ stages:

#### NonOfficial Pipeline Configuration

In the NonOfficial pipeline (e.g., `./pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml`):
In the NonOfficial pipeline (e.g., `.pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml`):

```yaml
stages:
Expand All @@ -146,7 +146,7 @@ stages:

#### Update Stages Template to Accept Parameter

The extracted stages template (e.g., `./pipelines/templates/PowerShell-Packages-Stages.yml`) must declare the parameter at the top:
The extracted stages template (e.g., `.pipelines/templates/PowerShell-Packages-Stages.yml`) must declare the parameter at the top:

```yaml
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ resources:
ref: refs/heads/main

variables:
- template: ./pipelines/templates/variables/PowerShell-Coordinated_Packages-Variables.yml@self
- template: ../templates/variables/PowerShell-Coordinated_Packages-Variables.yml@self
parameters:
InternalSDKBlobURL: ${{ parameters.InternalSDKBlobURL }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand All @@ -61,6 +61,7 @@ extends:
LinuxHostVersion:
Network: KS3
WindowsHostVersion:
Version: 2022
Network: KS3
incrementalSDLBinaryAnalysis: true
globalSdl:
Expand Down Expand Up @@ -90,7 +91,7 @@ extends:
tsaOptionsFile: .config\tsaoptions.json

stages:
- template: ./pipelines/templates/stages/PowerShell-Coordinated_Packages-Stages.yml@self
- template: ../templates/stages/PowerShell-Coordinated_Packages-Stages.yml@self
parameters:
RUN_WINDOWS: ${{ parameters.RUN_WINDOWS }}
RUN_TEST_AND_RELEASE: ${{ parameters.RUN_TEST_AND_RELEASE }}
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-Packages-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: pkgs-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ./pipelines/templates/variables/PowerShell-Packages-Variables.yml@self
- template: ../templates/variables/PowerShell-Packages-Variables.yml@self
parameters:
debug: ${{ parameters.debug }}
ForceAzureBlobDelete: ${{ parameters.ForceAzureBlobDelete }}
Expand Down Expand Up @@ -92,6 +92,6 @@ extends:
enabled: false
tsaOptionsFile: .config\tsaoptions.json
stages:
- template: ./pipelines/templates/stages/PowerShell-Packages-Stages.yml@self
- template: ../templates/stages/PowerShell-Packages-Stages.yml@self
parameters:
OfficialBuild: false
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: ev2-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ./pipelines/templates/variables/PowerShell-Release-Azure-Variables.yml@self
- template: ../templates/variables/PowerShell-Release-Azure-Variables.yml@self
parameters:
debug: ${{ parameters.debug }}

Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-Release-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: release-$(BUILD.SOURCEBRANCHNAME)-nonofficial-$(Build.BuildId)

variables:
- template: ./pipelines/templates/variables/PowerShell-Release-Variables.yml@self
- template: ../templates/variables/PowerShell-Release-Variables.yml@self
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand Down Expand Up @@ -98,7 +98,7 @@ extends:
tsaOptionsFile: .config\tsaoptions.json

stages:
- template: ./pipelines/templates/stages/PowerShell-Release-Stages.yml@self
- template: ../templates/stages/PowerShell-Release-Stages.yml@self
parameters:
releaseEnvironment: Test
SkipPublish: ${{ parameters.SkipPublish }}
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/NonOfficial/PowerShell-vPack-NonOfficial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters: # parameters are shown up in ADO UI in a build queue time
name: vPack_$(Build.SourceBranchName)_NonOfficial_Create.${{ parameters.createVPack }}_Name.${{ parameters.vPackName}}_$(date:yyyyMMdd).$(rev:rr)

variables:
- template: ./pipelines/templates/variables/PowerShell-vPack-Variables.yml@self
- template: ../templates/variables/PowerShell-vPack-Variables.yml@self
parameters:
debug: ${{ parameters.debug }}
ReleaseTagVar: ${{ parameters.ReleaseTagVar }}
Expand Down Expand Up @@ -82,7 +82,7 @@ extends:
enabled: false
tsaOptionsFile: .config/tsaoptions.json
stages:
- template: ./pipelines/templates/stages/PowerShell-vPack-Stages.yml@self
- template: ../templates/stages/PowerShell-vPack-Stages.yml@self
parameters:
createVPack: ${{ parameters.createVPack }}
vPackName: ${{ parameters.vPackName }}
Loading