Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8227f39
Try to publish in a separate pipeline
nagilson Dec 3, 2025
a49d632
Get the version in the release pipeline
nagilson Dec 3, 2025
dceb185
removes the publish step so we dont accidentally publish
nagilson Dec 3, 2025
1eeb718
Use CI VSCE since we may be blocked from global install
nagilson Dec 3, 2025
4bf9172
remove publish yml and update vsce minimum
nagilson Dec 4, 2025
61d8987
Fix Pipeline
nagilson Dec 4, 2025
3db9861
correctly check bool value
nagilson Dec 4, 2025
5b2d054
fix folder location
nagilson Dec 4, 2025
9d5b10f
properly use @self
nagilson Dec 4, 2025
719c36a
Merge remote-tracking branch 'upstream/main' into nagilson-separate-p…
nagilson Dec 5, 2025
6c0039b
fix artifact name
nagilson Dec 8, 2025
d3bce10
consume SBOM artifact
nagilson Dec 8, 2025
18dc1ce
Fix Pipeline
nagilson Dec 8, 2025
143d1a3
remove sbom disable logic - see if it works by default now
nagilson Dec 8, 2025
6d42a37
insert sbom into _manifest folder
nagilson Dec 8, 2025
452e9fb
signing should be conditional to prevent failures from trying to sign…
nagilson Dec 8, 2025
b6bc1e2
simplify artifact, sbom is now automatic
nagilson Dec 9, 2025
357e656
get version from the artifact
nagilson Dec 9, 2025
283f93d
fix ? version directory
nagilson Dec 9, 2025
af472e4
checkout self for package to make ci work
nagilson Dec 9, 2025
bf9abc4
try global install
nagilson Dec 9, 2025
5197cfc
rely on win
nagilson Dec 9, 2025
cd52562
fix pool
nagilson Dec 9, 2025
ddd0f98
try to get the package lock files as an artifact
nagilson Dec 9, 2025
b9677a9
don't create a separate 'signed' package
nagilson Dec 10, 2025
b17ea7c
Actually do the publish step now
nagilson Dec 10, 2025
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
5 changes: 3 additions & 2 deletions 1es-azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ variables:
value: true
- name: MicroBuildOutputFolderOverride
value: '$(Agent.TempDirectory)'
- name: TestBuild
value: $[eq(variables['Build.Reason'], 'Manual')]

resources:
repositories:
Expand Down Expand Up @@ -58,8 +60,6 @@ extends:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
sbom:
enabled: false # SBOM requires a special setup for node.js projects to ensure all dependencies are included.
policheck:
enabled: true
exclusionsFile: $(System.DefaultWorkingDirectory)\PoliCheckExclusions.xml
Expand Down Expand Up @@ -103,6 +103,7 @@ extends:
os: windows
useOneEngineeringPool: true
SignType: Real
TestBuild: $(TestBuild)
- template: pipeline-templates/sbom.yaml@self
parameters:
pool:
Expand Down
8 changes: 7 additions & 1 deletion msbuild/signJs/signJs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@
<IsPackable>false</IsPackable>
<OutDir>$(MSBuildProjectDirectory)\$(JSOutputPath)\</OutDir>
<MicroBuild_SigningEnabled>true</MicroBuild_SigningEnabled>
<ShouldSign>true</ShouldSign>
</PropertyGroup>

<PropertyGroup Condition="'$(SignType)' == ''">
<SignType>test</SignType>
</PropertyGroup>

<ItemGroup>
<PropertyGroup Condition="$([System.String]::Equals('$(TestBuild)', 'true', StringComparison.OrdinalIgnoreCase))">
<ShouldSign>false</ShouldSign>
<MicroBuild_SigningEnabled>false</MicroBuild_SigningEnabled>
</PropertyGroup>

<ItemGroup Condition="'$(ShouldSign)' == 'true'">
<FilesToSign Include="$(OutDir)*.js">
<Authenticode>MicrosoftSHA2</Authenticode>
</FilesToSign>
Expand Down
9 changes: 8 additions & 1 deletion msbuild/signVsix/signVsix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
<MicroBuild_DoNotStrongNameSign>true</MicroBuild_DoNotStrongNameSign>
<IsPackable>false</IsPackable>
<OutDir>$(RepoRoot)packages\</OutDir>
<ShouldSign>true</ShouldSign>
</PropertyGroup>
<ItemGroup>

<PropertyGroup Condition="$([System.String]::Equals('$(TestBuild)', 'true', StringComparison.OrdinalIgnoreCase))">
<ShouldSign>false</ShouldSign>
<MicroBuild_SigningEnabled>false</MicroBuild_SigningEnabled>
</PropertyGroup>

<ItemGroup Condition="'$(ShouldSign)' == 'true'">
<FilesToSign Include="$(OutDir)*.signature.p7s">
<Authenticode>VSCodePublisher</Authenticode>
</FilesToSign>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@types/source-map-support": "^0.5.6",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@vscode/vsce": "^3.6.0",
"@vscode/vsce": "^3.7.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
Expand Down
2 changes: 2 additions & 0 deletions pipeline-templates/list-file-structure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ parameters:
title: "🏠 SYSTEM DEFAULT WORKING DIRECTORY"
- path: $(Build.ArtifactStagingDirectory)
title: "🎯 BUILD ARTIFACT STAGING DIRECTORY"
- path: $(Pipeline.Workspace)
title: "🔧 PIPELINE WORKSPACE"
- name: displayName
type: string
default: '📋 List All Files Recursively'
Expand Down
36 changes: 24 additions & 12 deletions pipeline-templates/package-vsix.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
pool: ''
SignType: ''
TestBuild: 'false'

jobs:
- job: ${{ parameters.pool.os }}_Package
Expand All @@ -18,6 +19,10 @@ jobs:
displayName: '📂 Publish .VSIX'
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: '$(dir-name)'
- output: pipelineArtifact
displayName: '🗂️ Publish Package Files'
targetPath: '$(Build.ArtifactStagingDirectory)/package_files'
artifactName: 'package_files'
steps:
- template: install-node.yaml
- bash: |
Expand Down Expand Up @@ -65,11 +70,29 @@ jobs:
workingDirectory: $(dir-name)
env:
SignType: ${{ parameters.SignType }}
TestBuild: ${{ parameters.TestBuild }}
- template: list-file-structure.yaml
- pwsh: |
$target = Join-Path '$(Build.ArtifactStagingDirectory)' 'package_files'
if (-not (Test-Path $target)) {
New-Item -ItemType Directory -Path $target | Out-Null
}

$source = Join-Path '$(Build.SourcesDirectory)' '$(dir-name)'
$files = @('package.json', 'package-lock.json', '.npmrc', 'yarn.lock', '.yarnrc')

foreach ($file in $files) {
$sourcePath = Join-Path $source $file
if (Test-Path $sourcePath) {
Copy-Item -Path $sourcePath -Destination (Join-Path $target $file) -Force
}
}
displayName: '📁 Stage Package Files for Consumption to Enable NPM CI'
- script: dotnet build msbuild/signVsix -v:normal
displayName: 🖊️ Sign VSIXes
env:
SignType: ${{ parameters.SignType }}
TestBuild: ${{ parameters.TestBuild }}
- ${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
- pwsh: |
Function Spawn-Tool($command, $commandArgs, $retryCount=0) {
Expand Down Expand Up @@ -111,10 +134,6 @@ jobs:
}
displayName: 🔑 Verify VSIX Signature Files
workingDirectory: $(dir-name)
- task: CmdLine@2
displayName: 🤌 Rename Signed VSIX
inputs:
script: rename ".\packages\$(package-name)-$(GetVersion.version).vsix" $(package-name)-$(GetVersion.version)-signed.vsix
- task: CopyFiles@2
displayName: '📩 Copy Artifact'
inputs:
Expand All @@ -128,11 +147,4 @@ jobs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: '**\*.binlog'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: false
- ${{ if eq(parameters.useOneEngineeringPool, 'true') }}:
- template: publish.yaml
parameters:
pool: ${{ parameters.pool }}
SignType: ${{ parameters.SignType }}
version: $(GetVersion.version)
useOneEngineeringPool: true
flattenFolders: false
62 changes: 0 additions & 62 deletions pipeline-templates/publish.yaml

This file was deleted.

121 changes: 121 additions & 0 deletions release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
trigger: none
pr: none

parameters:
- name: test
type: boolean
default: true
Comment on lines +4 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: For consistency, keep list elements, - {prop}, aligned with the parent property. Thus,

Suggested change
parameters:
- name: test
type: boolean
default: true
parameters:
- name: test
type: boolean
default: true

You did this with variables: and repositories: and other stuff below. It still works if it is indented extra, but it just adds to confusion about YAML if they're all not the same.


variables:
# This is expected to provide the PAT used to tag the release.
- group: DncEng-Partners-Tokens

resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
pipelines:
- pipeline: officialBuildCI
source: dotnet-vscode-dotnet-runtime
branch: main
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: PublishStage
jobs:
- deployment: PublishToMarketplace
displayName: PublishToMarketplace
environment: vscode-dotnetcore-extension-releases
pool:
name: NetCore1ESPool-Internal
image: 1es-windows-2022
os: windows
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: officialBuildCI
artifactName: vscode-dotnet-runtime-extension
destinationPath: $(Pipeline.Workspace)
- input: pipelineArtifact
pipeline: officialBuildCI
artifactName: package_files
destinationPath: $(Pipeline.Workspace)/package_files
strategy:
runOnce:
deploy:
steps:
- template: pipeline-templates/install-node.yaml@self
- template: pipeline-templates/list-file-structure.yaml@self
- bash: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bash: is a shorthand for this task: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/bash-v3?view=azure-pipelines

Any reason this script needs to be bash on Windows? It then requires the script to run under WSL. Copilot could probably directly convert this to PowerShell pretty easily. Then, this entire job just uses PowerShell.

ARTIFACT_DIR="$(Pipeline.Workspace)"
VSIX_PATH=$(find "$ARTIFACT_DIR" -type f -name 'vscode-dotnet-runtime-*.vsix' | head -n 1)
if [ -z "$VSIX_PATH" ]; then
echo "##vso[task.logissue type=error]Unable to locate vscode-dotnet-runtime-*.vsix under $ARTIFACT_DIR"
exit 1
fi

FILE_NAME=$(basename "$VSIX_PATH")
VERSION=${FILE_NAME#vscode-dotnet-runtime-}
VERSION=${VERSION%.vsix}

echo "Using version $VERSION derived from artifact $FILE_NAME"

PACKAGE_FILES_DIR="$ARTIFACT_DIR/package_files"
if [ -f "$PACKAGE_FILES_DIR/package.json" ]; then
(cd "$PACKAGE_FILES_DIR" && npm version "$VERSION" --allow-same-version)
fi

echo "##vso[task.setvariable variable=version;isOutput=true]$VERSION"
name: GetVersion
displayName: '❓ Get Version'
- pwsh: |
$packageFilesDir = Join-Path '$(Pipeline.Workspace)' 'package_files'
if (-not (Test-Path $packageFilesDir)) {
Write-Error "package_files artifact was not downloaded."
exit 1
}

Push-Location $packageFilesDir
try {
npm ci
}
finally {
Pop-Location
}
displayName: '⬇️ Restore Node Dependencies'
- task: AzureCLI@2
displayName: '🚀 Publish to Marketplace'
inputs:
azureSubscription: 'VSCode Marketplace Publishing'
scriptType: "pscore"
scriptLocation: 'inlineScript'
workingDirectory: '$(Pipeline.Workspace)/package_files'
inlineScript: |
$packagePath = Join-Path '$(Pipeline.Workspace)' 'vscode-dotnet-runtime-$(GetVersion.version).vsix'
$manifestPath = Join-Path '$(Pipeline.Workspace)' 'vscode-dotnet-runtime-$(GetVersion.version).manifest'
$signaturePath = Join-Path '$(Pipeline.Workspace)' 'vscode-dotnet-runtime-$(GetVersion.version).signature.p7s'

$publishArgs = @('publish', '--azure-credential', '--packagePath', $packagePath, '--manifestPath', $manifestPath, '--signaturePath', $signaturePath)
$publishArgsString = $publishArgs -join ' '
If (${{ parameters.test }}) {
Write-Host "With a test-signed build, the command to publish is printed instead of run."
Write-Host "##[command]npx vsce $publishArgsString"

Write-Host "🔒 Verify PAT."
npx vsce verify-pat --azure-credential ms-dotnettools
}
Else {
Write-Host "##[command]npx vsce $publishArgsString"
npx vsce $publishArgs
}
Loading