Skip to content

Improve performance of publish pipeline #6907

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
jobs:
- job: build
displayName: Build Packages

pool:
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux
variables:
TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build

Expand Down Expand Up @@ -31,13 +34,6 @@ jobs:
Contents: "*.vsix"
TargetFolder: "$(Build.ArtifactStagingDirectory)/vscode-extension"

- task: CopyFiles@2
displayName: "Copy VS extension .vsix to artifact directory"
inputs:
SourceFolder: "$(Build.SourcesDirectory)/packages/typespec-vs"
Contents: "*.vsix"
TargetFolder: "$(Build.ArtifactStagingDirectory)/vs-extension"

- task: AzureCLI@1
displayName: "Publish bundled packages to package storage"
inputs:
Expand All @@ -53,7 +49,7 @@ jobs:
displayName: Regen manifest for compiler
workingDirectory: ./packages/compiler

- script: pnpm chronus pack --exclude standalone --pack-destination $(Build.ArtifactStagingDirectory)/npm-packages-next
- script: pnpm chronus pack --exclude standalone --exclude typespec-vs --pack-destination $(Build.ArtifactStagingDirectory)/npm-packages-next
displayName: Pack next packages

# Publish Next playground
Expand All @@ -63,12 +59,12 @@ jobs:
azureSubscription: "Azure SDK Engineering System"
scriptLocation: inlineScript
inlineScript: |
az storage blob upload-batch ^
--auth-mode login ^
--destination $web ^
--account-name "cadlplayground" ^
--destination-path / ^
--source "./packages/playground-website/dist/web/" ^
az storage blob upload-batch \
--auth-mode login \
--destination '$web' \
--account-name "cadlplayground" \
--destination-path / \
--source "./packages/playground-website/dist/web/" \
--overwrite

templateContext:
Expand All @@ -87,8 +83,3 @@ jobs:
path: $(Build.ArtifactStagingDirectory)/vscode-extension
artifact: vscode-extension-unsigned
displayName: Publish VSCode extension(.vsix) as pipeline artifacts

- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/vs-extension
artifact: vs-extension-unsigned
displayName: Publish VS extension(.vsix) as pipeline artifacts
32 changes: 32 additions & 0 deletions eng/tsp-core/pipelines/jobs/build-vs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
jobs:
- job: build_vs
displayName: Build VS extension
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows

variables:
TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build

steps:
- template: /eng/tsp-core/pipelines/templates/install.yml
parameters:
useDotNet: true

- script: pnpm -r --filter "typespec-vs..." build
displayName: Build

- task: CopyFiles@2
displayName: "Copy VS extension .vsix to artifact directory"
inputs:
SourceFolder: "$(Build.SourcesDirectory)/packages/typespec-vs"
Contents: "*.vsix"
TargetFolder: "$(Build.ArtifactStagingDirectory)/vs-extension"

templateContext:
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/vs-extension
artifact: vs-extension-unsigned
displayName: Publish VS extension(.vsix) as pipeline artifacts
31 changes: 3 additions & 28 deletions eng/tsp-core/pipelines/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ trigger:
branches:
include:
- main
- publish-perf
# For patch releases
- release/*
paths:
Expand All @@ -25,13 +26,9 @@ extends:
dependsOn: []
displayName: Build

pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows

jobs:
- template: /eng/tsp-core/pipelines/jobs/build-for-publish.yml@self
- template: /eng/tsp-core/pipelines/jobs/build-packages.yml@self
- template: /eng/tsp-core/pipelines/jobs/build-vs.yml@self
- template: /eng/tsp-core/pipelines/jobs/cli/build-tsp-cli-all.yml@self
- template: /eng/tsp-core/pipelines/jobs/e2e.yml@self
parameters:
Expand Down Expand Up @@ -99,25 +96,3 @@ extends:
displayName: "Build"
- script: docker push $(imageName) --all-tags
displayName: "Push"

- stage: validate_manifest
displayName: Validate Manifest
dependsOn: build
jobs:
- job: validate_manifest
displayName: Validate Manifest
pool:
name: $(WINDOWSPOOL)
image: $(WINDOWSVMIMAGE)
os: windows
variables:
TYPESPEC_SKIP_DOCUSAURUS_BUILD: true # Disable docusaurus build
steps:
- template: /eng/tsp-core/pipelines/templates/install.yml
- template: /eng/tsp-core/pipelines/templates/build.yml

- script: pnpm run validate-scenarios --debug
displayName: Validate Scenarios

- script: pnpm run validate-mock-apis --debug
displayName: Validate mock apis
Loading