Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b785b6e
pipelines: Major improvements
bwateratmsft Jan 28, 2026
8a0aeba
Remove some done TODOs
bwateratmsft Jan 28, 2026
7fd3147
Apply suggestions from code review
bwateratmsft Jan 28, 2026
2df5f81
Copilot feedback
bwateratmsft Jan 28, 2026
ad3874d
Consistency with other pipeline
bwateratmsft Jan 28, 2026
de7303f
Note
bwateratmsft Jan 28, 2026
38aea3b
Add npm authenticate
bwateratmsft Jan 28, 2026
07b660d
Minor edits
bwateratmsft Jan 28, 2026
9b6ffd2
Other subfolder
bwateratmsft Jan 28, 2026
f47fc66
Add readme
bwateratmsft Jan 28, 2026
4621974
Add release instructions
bwateratmsft Jan 28, 2026
87b0e5e
Pipeline for it
bwateratmsft Jan 28, 2026
3ac7c00
Branches instead of tags
bwateratmsft Jan 28, 2026
8b7a321
Add examples to readme
bwateratmsft Jan 29, 2026
e0b382e
Renames of a few things
bwateratmsft Jan 29, 2026
8090ffb
Add note about signing on NPM packages
bwateratmsft Jan 29, 2026
ae96551
Add defaults
bwateratmsft Jan 29, 2026
ea4c554
Add migration doc
bwateratmsft Jan 29, 2026
e6da3f2
Copilot feedback
bwateratmsft Jan 29, 2026
05e80bc
Apply suggestions from code review
bwateratmsft Jan 29, 2026
326bc25
Merge branch 'bmw/pipelinesv2_2' of https://github.com/microsoft/vsco…
bwateratmsft Jan 29, 2026
42f5894
Update azdo-pipelines/templates/1es-mb-sign.yml
bwateratmsft Jan 29, 2026
c49f2fb
Add examples
bwateratmsft Jan 29, 2026
d054593
Merge branch 'bmw/pipelinesv2_2' of https://github.com/microsoft/vsco…
bwateratmsft Jan 29, 2026
0c0457a
Mapping fix
bwateratmsft Jan 29, 2026
7e5ad96
`TeamName` var
bwateratmsft Jan 29, 2026
dc668e9
`TeamName` var
bwateratmsft Jan 29, 2026
584a04d
Merge branch 'main' into bmw/pipelinesv2_2
bwateratmsft Jan 30, 2026
9e24212
Merge branch 'main' into bmw/pipelinesv2_2
bwateratmsft Feb 9, 2026
6d0f5ad
Apparently single quotes
bwateratmsft Feb 9, 2026
b5a9578
Reshaping?
bwateratmsft Feb 9, 2026
bad5294
Repathing I guess
bwateratmsft Feb 9, 2026
657d270
Try this?
bwateratmsft Feb 9, 2026
942eb10
But keep that part
bwateratmsft Feb 9, 2026
5ab978a
Try removing env temporarily
bwateratmsft Feb 9, 2026
6becbd8
Disabling things
bwateratmsft Feb 9, 2026
561b16e
Thing
bwateratmsft Feb 9, 2026
25caf58
Thing
bwateratmsft Feb 9, 2026
f543d56
Show broken
bwateratmsft Feb 9, 2026
7d45a4b
Rolling it back
bwateratmsft Feb 9, 2026
2478c1b
Switch temporarily
bwateratmsft Feb 9, 2026
4aa0697
Try to make it a deployment job
bwateratmsft Feb 9, 2026
3df60fb
Going back to where I was
bwateratmsft Feb 9, 2026
0a0e33c
Try reversing owner/approver
bwateratmsft Feb 9, 2026
745cee5
Fine then, be that way
bwateratmsft Feb 9, 2026
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
92 changes: 92 additions & 0 deletions .github/workflows/release-pipeline-templates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Release Pipeline Templates

on:
workflow_dispatch:
inputs:
branch:
description: "Branch to update (e.g., azext-pt/v1)"
required: true
default: "azext-pt/v1"

jobs:
create-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/github-script@v7
with:
script: |
const branch = '${{ inputs.branch }}';

// Validate branch format
if (!/^azext-pt\/v\d+$/.test(branch)) {
core.setFailed(`Branch must match pattern azext-pt/vN (e.g., azext-pt/v1)`);
return;
}

// Get main branch SHA
const { data: mainRef } = await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'heads/main'
});
const mainSha = mainRef.object.sha;

// Check if release branch exists
let branchExists = true;
let branchSha = null;
try {
const { data: branchRef } = await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branch}`
});
branchSha = branchRef.object.sha;
} catch (e) {
if (e.status === 404) {
branchExists = false;
} else {
throw e;
}
}

// Create branch if it doesn't exist
if (!branchExists) {
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/heads/${branch}`,
sha: mainSha
});
core.summary.addHeading('✅ Branch Created', 2);
core.summary.addRaw(`**Branch:** \`${branch}\`\n\n`);
core.summary.addRaw(`**Commit:** \`${mainSha}\`\n`);
await core.summary.write();
return;
}

// Check if already up to date
if (mainSha === branchSha) {
core.notice(`Branch ${branch} is already up to date with main`);
core.summary.addHeading('ℹ️ No Changes', 2);
core.summary.addRaw(`Branch \`${branch}\` is already at the same commit as \`main\`.\n`);
await core.summary.write();
return;
}

// Create PR
const { data: pr } = await github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
head: 'main',
base: branch,
title: `Release pipeline templates to ${branch}`,
body: `Updates \`${branch}\` to match \`main\`.\n\n**Current ${branch}:** \`${branchSha}\`\n**New (from main):** \`${mainSha}\`\n\nTriggered by @${{ github.actor }} via workflow dispatch.`
});

core.summary.addHeading('✅ PR Created', 2);
core.summary.addRaw(`**PR:** ${pr.html_url}\n\n`);
core.summary.addRaw(`**Target Branch:** \`${branch}\`\n`);
await core.summary.write();
87 changes: 87 additions & 0 deletions azdo-pipelines/1es-mb-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
parameters:
# Set to true for official builds, false for PRs and other unofficial builds
- name: isOfficialBuild
type: boolean
default: true

# The jobs to run. Use to parallelize building in subdirectories
- name: jobs
type: object
default:
- name: Root
working_directory: .

# The pool to use for the SDL stage
- name: sdlPool
type: object
default:
name: VSEngSS-MicroBuild2022-1ES
image: server2022-microbuildVS2022-1es
os: windows

# The pool to use for the build stage
- name: buildPool
type: object
default:
name: AzurePipelines-EO
image: 1ESPT-Ubuntu22.04
os: linux

# Set to 'real' or 'test' to enable MicroBuild signing
- name: signType
type: string
values:
- real
- test
- none
default: real

# Supply to disable MicroBuild signing steps and use these instead
- name: alternativeSigningSteps
type: stepList
default: []

# Additional steps to run during setup (e.g. npm authenticate etc.)
- name: additionalSetupSteps
type: stepList
default: []

# Set to the ARM service connection name to enable tests with Azure federated credentials
- name: testARMServiceConnection
type: string
default: ""

resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/heads/release

extends:
${{ if eq(parameters.isOfficialBuild, true) }}:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
${{ else }}:
template: azure-pipelines/MicroBuild.1ES.Unofficial.yml@MicroBuildTemplate

parameters:
sdl:
${{ if eq(parameters.isOfficialBuild, true) }}:
tsa:
enabled: true
componentgovernance:
directoryExclusionPatterns: "**/.vscode-test"
codeql:
excludePathPatterns: "**/.vscode-test, **/dist"

pool: ${{ parameters.sdlPool }}

stages:
- template: ./stages/1es-stages.yml
parameters:
jobs: ${{ parameters.jobs }}
buildPool: ${{ parameters.buildPool }}
signType: ${{ parameters.signType }}
alternativeSigningSteps: ${{ parameters.alternativeSigningSteps }}
additionalSetupSteps: ${{ parameters.additionalSetupSteps }}
testARMServiceConnection: ${{ parameters.testARMServiceConnection }}
115 changes: 115 additions & 0 deletions azdo-pipelines/1es-mb-release-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
parameters:
# The name of the package to publish.
# This is regex matched against .vsix files found in the build artifact.
- name: packageToPublish
type: string

# The intended package version to publish.
# This is used to verify the version in package.json matches the version to publish to avoid publishing the wrong package/version
- name: publishVersion
type: string

# When true, skips the deployment job that actually publishes the package
- name: dryRun
type: boolean
default: false

# In the build artifacts, the name of the artifact containing the package to publish
- name: artifactName
type: string
default: Build Root

# The service connection that VSCE will use to publish the extension
- name: releaseServiceConnection
type: string

# Set to the AzDO environment used for enforcing approval before the release runs
- name: releaseApprovalEnvironment
type: string
default: ""

# The pool to use for releases
- name: releasePool
type: object
default:
name: VSEngSS-MicroBuild2022-1ES
image: server2022-microbuildVS2022-1es
os: windows

resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/heads/release

extends:
template: azure-pipelines/MicroBuild.1ES.Official.Publish.yml@MicroBuildTemplate
parameters:
pool: ${{ parameters.releasePool }}
stages:
- stage: ReleaseStage
displayName: Release extension
jobs:
- job: Publish
displayName: Publish extension
# TODO: not working, `jobs.job` doesn't support `environment`, only `jobs.deployment` does
# ${{ if ne(parameters.releaseApprovalEnvironment, '') }}:
# environment: ${{ parameters.releaseApprovalEnvironment }}
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: build
targetPath: "$(System.DefaultWorkingDirectory)"
artifactName: "${{ parameters.artifactName }}"
steps:
- checkout: none

- task: NodeTool@0
displayName: "\U0001F449 Using Node.js"
inputs:
versionSpec: 22.x

- template: azdo-pipelines/templates/find-vsixs.yml@azExtTemplates
parameters:
vsixName: ${{ parameters.packageToPublish }}
publishVersion: ${{ parameters.publishVersion }}

- template: azdo-pipelines/templates/set-release-build-number.yml@azExtTemplates
parameters:
packageToPublish: ${{ parameters.packageToPublish }}
publishVersion: ${{ parameters.publishVersion }}
dryRun: ${{ parameters.dryRun }}

# Publish the package to VS Marketplace
- ${{ if eq(parameters.dryRun, false) }}:
- task: AzureCLI@2
displayName: "\U0001F449 Publish VSIXs to Marketplace"
inputs:
azureSubscription: ${{ parameters.releaseServiceConnection }}
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$vsixList = @('$(vsixListJson)' | ConvertFrom-Json)

# Publish each of the found VSIXs, automatically adding the enabled API proposals argument as well
foreach ($vsix in $vsixList) {
Set-Location $vsix.directory

$commandLine = "npx @vscode/vsce@latest publish --azure-credential --packagePath $($vsix.vsixName) --manifestPath $($vsix.manifestName) --signaturePath $($vsix.signatureName)"
if ($vsix.proposedApis -ne $null -and $vsix.proposedApis.Count -gt 0) {
$commandLine += " --allow-proposed-apis $($vsix.proposedApis -join ' ')"
}

Write-Output "Publishing VSIX: $($vsix.vsixName) with command:"
Write-Output " $($commandLine)"

# Execute the publish command line
# Invoke-Expression $commandLine # TODO: temporarily disabled for testing
# if ($LASTEXITCODE -ne 0) {
# Write-Error "Failed to publish VSIX: $($vsix.vsixName)"
# exit 1
# }
}
Loading