-
Notifications
You must be signed in to change notification settings - Fork 19
Update azure-devdiv-pipeline.pre-release.yml for Azure Pipelines #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 44 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
4befed7
Update azure-devdiv-pipeline.pre-release.yml for Azure Pipelines
bschnurr 397166d
try adding signing
bschnurr 07a3b23
update vsce
bschnurr 8e7a556
remove separate sign stage
bschnurr ec67a27
change directories
bschnurr 119de92
add verify sigend vsix is different
bschnurr 8e11b0c
make msbuild verbosity diagnostic
bschnurr 86a35a0
add a verification step
bschnurr 5f3cad8
remove repacking
bschnurr f03ef7f
remove hash compare
bschnurr 37f5804
check dist folder
bschnurr 0d0cf29
fix -and
bschnurr 84c3d86
try to simplify
bschnurr 2a4fed1
Revert "try to simplify"
bschnurr 9293d28
lets output to just drop
bschnurr a2dc69d
refactor signing
bschnurr 8fc0aa4
try to simplify
bschnurr 8eed002
update how signing
bschnurr 1b0bbeb
try to add actual publish
bschnurr bc1bc3f
try to fix publish
bschnurr dda3326
just remove separate stage
bschnurr b59744e
split publsh into its own step
bschnurr 53e618e
move installs to parent yml. move sign.proj to build folder
bschnurr e92fcff
fix msbuild args. turn detailed back and and pass dir
bschnurr 2a9293f
nuget restore
bschnurr 72c8376
remove nuget restore
bschnurr e0c0346
update sign.proj
bschnurr eb5c449
update nuget package paths
bschnurr 54e2b83
fix singature location
bschnurr 26a7db3
add stable pipeline
bschnurr 3da216e
we need need a step to install vscode/vsce@latest because npm ci shou…
bschnurr 10b737f
use npx vsce
bschnurr 0b10c0b
update to node 22 and turn on nightly, and enable actuall publish cal…
bschnurr 2816ccb
change step to copy vsix to drop. remove unused variables.
bschnurr a939fe2
add build vsix
bschnurr d3b1b6b
package script already triggered in svce package
bschnurr e6cda01
create drop folder
bschnurr 5cd6b35
add vsix name variable
bschnurr 655a30e
add vsix name to stable
bschnurr 05d4e53
remove schedule
bschnurr 279f4db
forgot --release on stable build number
bschnurr 4da9eb4
publish stable on tag push
bschnurr 044b2eb
fix pretter. new command to run fix prettier
bschnurr 37e8995
Merge branch 'main' into azure-pipelines
bschnurr c21f28d
Update build/azure-devdiv-pipeline.stable.yml
bschnurr 04e4c70
Update build/azure-devdiv-pipeline.stable.yml
bschnurr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| name: Publish Release | ||
| trigger: | ||
| branches: | ||
| include: | ||
| - refs/tags/* | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: MicroBuildTemplate | ||
| type: git | ||
| name: 1ESPipelineTemplates/MicroBuildTemplate | ||
| ref: refs/tags/release | ||
| variables: | ||
| - name: TeamName | ||
| value: VSCode-autopep8 | ||
| - name: VsixName | ||
| value: autopep8.vsix | ||
|
|
||
| parameters: | ||
| - name: publishExtension | ||
| displayName: 🚀 Publish Extension | ||
| type: boolean | ||
| default: false | ||
|
|
||
| extends: | ||
| template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate | ||
| parameters: | ||
| sdl: | ||
| sourceAnalysisPool: VSEngSS-MicroBuild2022-1ES | ||
| codeSignValidation: | ||
| enabled: true | ||
| sbom: | ||
| enabled: false # Disable global SBOM generation; we'll enable selectively per artifact output | ||
| pool: | ||
| name: AzurePipelines-EO | ||
| os: windows | ||
|
|
||
| customBuildTags: | ||
| - ES365AIMigrationTooling | ||
| stages: | ||
| - stage: Build | ||
| displayName: Build & Package Extension | ||
| jobs: | ||
| - job: Build | ||
| displayName: Build Job | ||
| pool: | ||
| name: VSEngSS-MicroBuild2022-1ES # use windows for codesigning to make things easier https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/650/MicroBuild-Signing | ||
| os: windows | ||
| templateContext: | ||
| mb: | ||
| signing: | ||
| enabled: true | ||
| signType: real | ||
| signWithProd: true | ||
| outputs: | ||
| - output: pipelineArtifact | ||
| displayName: 'Publish Drop Artifact' | ||
| targetPath: '$(Build.StagingDirectory)\drop' | ||
| artifactName: drop | ||
| sbomEnabled: true | ||
| steps: | ||
| - task: NodeTool@0 | ||
| inputs: | ||
| versionSpec: '22.x' | ||
| checkLatest: true | ||
| displayName: Select Node 20 LTS | ||
| - task: UsePythonVersion@0 | ||
| inputs: | ||
| versionSpec: '3.13' | ||
| addToPath: true | ||
| architecture: 'x64' | ||
| displayName: Select Python version | ||
|
|
||
| - script: npm ci | ||
| displayName: Install NPM dependencies | ||
|
|
||
| - script: python -m pip install -U pip | ||
| displayName: Upgrade pip | ||
|
|
||
| - script: python -m pip install wheel | ||
| displayName: Install wheel | ||
|
|
||
| - script: python -m pip install nox | ||
| displayName: Install nox | ||
|
|
||
| - script: python -m nox --session install_bundled_libs | ||
| displayName: Install Python dependencies | ||
|
|
||
| - script: python ./build/update_ext_version.py --release --for-publishing | ||
| displayName: Update build number | ||
|
|
||
| - script: npm run package | ||
| displayName: Build extension | ||
|
|
||
| - powershell: | | ||
bschnurr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| New-Item -ItemType Directory -Path "$(Build.StagingDirectory)\drop" -Force | Out-Null; Copy-Item "$(Build.SourcesDirectory)\$(VsixName)" "$(Build.StagingDirectory)\drop\$(VsixName)" -Force; if (!(Test-Path "$(Build.StagingDirectory)\drop\$(VsixName)")) { Write-Error 'VSIX copy failed'; exit 1 }; Get-Item "$(Build.StagingDirectory)\drop\$(VsixName)" | Format-Table Name,Length,LastWriteTime -AutoSize | ||
| displayName: Copy VSIX into drop | ||
|
|
||
| - script: npx vsce generate-manifest -i "$(Build.StagingDirectory)\drop\$(VsixName)" -o "$(Build.StagingDirectory)\drop\extension.manifest" | ||
| displayName: Generate extension manifest | ||
|
|
||
| - template: build/templates/sign.yml@self | ||
| parameters: | ||
| vsixName: $(VsixName) | ||
| workingDirectory: $(Build.StagingDirectory)\drop | ||
| signType: real | ||
| verifySignature: true | ||
|
|
||
| - ${{ if eq(parameters.publishExtension, true) }}: | ||
| - template: build/templates/publish.yml@self | ||
| parameters: | ||
| azureSubscription: PylancePublishPipelineSecureConnectionWithManagedIdentity | ||
| vsixName: $(VsixName) | ||
| manifestName: extension.manifest | ||
| signatureName: extension.signature.p7s | ||
| publishFolder: drop | ||
| preRelease: false | ||
| noVerify: true | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- Adjusted package path to parent directory since NuGet restore places packages at repository root --> | ||
| <Import Project="..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.props" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" /> | ||
|
|
||
|
|
||
| <Target Name="SetSigningProperties"> | ||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <!-- Emit signing outputs into BaseOutputDirectory; allow override from MSBuild /p:BaseOutputDirectory=... --> | ||
| <BaseOutputDirectory Condition="'$(BaseOutputDirectory)' == ''">.\</BaseOutputDirectory> | ||
| <!-- These properties are required by MicroBuild, which only signs files that are under these paths --> | ||
| <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseOutputDirectory)/intermediate</IntermediateOutputPath> | ||
| <OutDir Condition="'$(OutDir)' == ''">$(BaseOutputDirectory)</OutDir> | ||
| </PropertyGroup> | ||
| </Target> | ||
|
|
||
| <!-- Reintroduced CopySignatureFile & CopyBackSignatureFile so signing flow is self-contained --> | ||
|
|
||
| <Target Name="CopySignatureFile" BeforeTargets="GetFilesToSign"> | ||
| <!-- Use manifest from OutDir (working directory passed via /p:OutDir) and ensure proper path joining with explicit backslash --> | ||
| <Error Condition="!Exists('$(OutDir)\\extension.manifest')" Text="Manifest not found at $(OutDir)\\extension.manifest. Ensure manifest generation precedes signing." /> | ||
| <Copy SourceFiles="$(OutDir)\\extension.manifest" DestinationFiles="$(OutDir)\\extension.signature.p7s" SkipUnchangedFiles="true" /> | ||
| </Target> | ||
|
|
||
| <Target Name="CopyBackSignatureFile" AfterTargets="SignFiles"> | ||
| <Copy Condition="Exists('$(OutDir)extension.signature.p7s')" SourceFiles="$(OutDir)extension.signature.p7s" DestinationFiles="$(ProjectDir)extension.signature.p7s" /> | ||
| </Target> | ||
|
|
||
|
|
||
| <!-- SignFiles now fails fast if MicroBuild signing targets are missing --> | ||
| <Target Name="SignFiles"> | ||
| <Error Condition="!Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" Text="MicroBuild signing targets missing. Run NuGet restore before invoking MSBuild (packages.config)." /> | ||
| <Message Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" Text="MicroBuild signing targets detected; delegating signing to imported targets." Importance="high" /> | ||
| </Target> | ||
|
|
||
|
|
||
| <Target Name="GetFilesToSign" BeforeTargets="SignFiles"> | ||
| <ItemGroup> | ||
| <FilesToSign Include="$(OutDir)\\extension.signature.p7s"> | ||
| <Authenticode>VSCodePublisher</Authenticode> | ||
| </FilesToSign> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <Target Name="Build" BeforeTargets="CopySignatureFile"> | ||
| <MakeDir Directories="$(OutDir)"/> | ||
| </Target> | ||
|
|
||
| <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="Build"> | ||
| <PropertyGroup> | ||
| <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
| </PropertyGroup> | ||
| <Error Condition="!Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.props'))" /> | ||
| <Error Condition="!Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets'))" /> | ||
| </Target> | ||
|
|
||
| <Import Project="..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" /> | ||
| </Project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.