-
Notifications
You must be signed in to change notification settings - Fork 393
Utilize a separate pipeline for release tasks #2515
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
Open
nagilson
wants to merge
30
commits into
dotnet:main
Choose a base branch
from
nagilson:nagilson-separate-pipeline-for-pub
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
8227f39
Try to publish in a separate pipeline
nagilson a49d632
Get the version in the release pipeline
nagilson dceb185
removes the publish step so we dont accidentally publish
nagilson 1eeb718
Use CI VSCE since we may be blocked from global install
nagilson 4bf9172
remove publish yml and update vsce minimum
nagilson 61d8987
Fix Pipeline
nagilson 3db9861
correctly check bool value
nagilson 5b2d054
fix folder location
nagilson 9d5b10f
properly use @self
nagilson 719c36a
Merge remote-tracking branch 'upstream/main' into nagilson-separate-p…
nagilson 6c0039b
fix artifact name
nagilson d3bce10
consume SBOM artifact
nagilson 18dc1ce
Fix Pipeline
nagilson 143d1a3
remove sbom disable logic - see if it works by default now
nagilson 6d42a37
insert sbom into _manifest folder
nagilson 452e9fb
signing should be conditional to prevent failures from trying to sign…
nagilson b6bc1e2
simplify artifact, sbom is now automatic
nagilson 357e656
get version from the artifact
nagilson 283f93d
fix ? version directory
nagilson af472e4
checkout self for package to make ci work
nagilson bf9abc4
try global install
nagilson 5197cfc
rely on win
nagilson cd52562
fix pool
nagilson ddd0f98
try to get the package lock files as an artifact
nagilson b9677a9
don't create a separate 'signed' package
nagilson b17ea7c
Actually do the publish step now
nagilson 62950ee
Fix whitespace
nagilson 22b1cf2
Fix dependencies from updaets
nagilson 758482e
convert to powershell over bash
nagilson 289e992
Pin versions for lint to prevent sub ci issue
nagilson 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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,92 @@ | ||
| trigger: none | ||
| pr: none | ||
|
|
||
| parameters: | ||
| - name: test | ||
| type: boolean | ||
| default: false | ||
|
|
||
| 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-ubuntu-2204 | ||
| os: linux | ||
| templateContext: | ||
| type: releaseJob | ||
| isProduction: true | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| pipeline: officialBuildCI | ||
| artifactName: vscode-dotnet-runtime | ||
| destinationPath: $(Pipeline.Workspace) | ||
| strategy: | ||
| runOnce: | ||
| deploy: | ||
| steps: | ||
| - template: /pipelines-templates/install-node.yaml | ||
| - template: list-file-structure.yaml | ||
| - bash: | | ||
| VERSION=`node -p "require('./package.json').version"` | ||
| npm version $VERSION --allow-same-version | ||
| echo "##vso[task.setvariable variable=version;isOutput=true]$VERSION" | ||
| name: GetVersion | ||
| displayName: '❓ Get Version' | ||
| workingDirectory: 'vscode-dotnet-runtime-extension' | ||
| - pwsh: | | ||
| npm ci @vscode/vsce | ||
| displayName: '⬇️ Install @vscode/vsce' | ||
| - task: AzureCLI@2 | ||
| displayName: '🚀 Publish to Marketplace' | ||
| inputs: | ||
| azureSubscription: 'VSCode Marketplace Publishing' | ||
| scriptType: "pscore" | ||
| scriptLocation: 'inlineScript' | ||
| workingDirectory: '$(System.ArtifactsDirectory)' | ||
| inlineScript: | | ||
| $basePublishArgs = , "publish" | ||
| $basePublishArgs += '--azure-credential' | ||
| $basePublishArgs += '--packagePath' | ||
| $publishArgs = $basePublishArgs + 'vscode-dotnet-runtime-$(GetVersion.version)-signed.vsix' | ||
| $publishArgs += '--manifestPath' | ||
| $publishArgs += 'vscode-dotnet-runtime-$(GetVersion.version).manifest' | ||
| $publishArgs += '--signaturePath' | ||
| $publishArgs += 'vscode-dotnet-runtime-$(GetVersion.version).signature.p7s' | ||
| If ("${{ parameters.SignType }}" -ne "Real") { | ||
| Write-Host "With a test-signed build, the command to publish is printed instead of run." | ||
| Write-Host "##[command]npx vsce $publishArgs" | ||
|
|
||
| Write-Host "🔒 Verify PAT." | ||
| npx vsce verify-pat --azure-credential ms-dotnettools | ||
| } | ||
| Else { | ||
| Write-Host "##[command]npx vsce $publishArgs" | ||
|
|
||
nagilson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
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.
There was a problem hiding this comment.
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-pipelinesAny 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.