-
Notifications
You must be signed in to change notification settings - Fork 21
NPM publishing #563
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
+789
−132
Merged
NPM publishing #563
Changes from 11 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
e1d5002
feat: npm package build and release pipelines
tnaum-ms aca95e6
fix: finalize npm package build and release pipelines
guanzhousongmicrosoft b2d0226
docs: address review feedback on npm release pipeline
guanzhousongmicrosoft 12aed61
Merge branch 'main' into dev/guanzhousong/npm-publishing
tnaum-ms 1daba4f
ci: make npm build pipeline manual-only (trigger: none)
tnaum-ms 6a98725
ci: update release package to @microsoft/vscode-ext-webview
tnaum-ms 38a5f5e
ci: add loud banner for real publish mode in release pipeline
tnaum-ms 843d18d
ci: cap PublishPackage job with a 120-minute timeout
tnaum-ms 12cfe47
ci: include run mode in release stage display name
tnaum-ms 6b3e5ad
ci: add ADO run-summary boxes to npm build and release pipelines
tnaum-ms fe9344c
ci: extract inline pipeline PowerShell into .azure-pipelines/scripts/
tnaum-ms 1ecf150
fix(ci): remove emoji from pipeline .ps1 scripts (Windows PS 5.1 enco…
tnaum-ms 6896881
ci: set descriptive ADO run names for npm pipelines
tnaum-ms 874b041
fix(ci): standardize display names in YAML pipeline files
tnaum-ms 4d3be21
ci: print run info to log instead of task.uploadsummary (policy)
tnaum-ms e6ca460
fix(ci): bundle pipeline scripts into build artifact for release job
tnaum-ms a198005
ci: inline release pipeline scripts; drop artifact script bundling
tnaum-ms a6c4d68
ci: make release 'mode' picklist self-documenting via prefix matching
tnaum-ms 888b125
fix: clarify description of test-esrp-auth parameter in release pipeline
tnaum-ms a6a0a6b
fix: enhance descriptions for run mode parameters in release pipeline
tnaum-ms 8068d4f
fix: add additional release owners and approvers for ESRP notifications
tnaum-ms 7596a08
fix(ci): use comma to separate ESRP owners/approvers emails
tnaum-ms 6f6bb5e
fix(ci): read package.json with -Raw before ConvertFrom-Json in pack …
tnaum-ms 12b3eac
fix(ci): force array before .Count when counting .tgz files in pack s…
tnaum-ms 371622f
fix(ci): read package.json with -Raw before ConvertFrom-Json in relea…
tnaum-ms 19e5005
fix(ci): force array when matching .tgz files in release pipeline
tnaum-ms 1f8b785
Merge branch 'main' into dev/tnaum/npm-publishing
tnaum-ms 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,62 +1,145 @@ | ||
| # Dummy build pipeline for configuration validation | ||
| # Replace with build-npm-packages.yml once ADO pipeline is configured | ||
|
|
||
| trigger: none | ||
| pr: none | ||
|
|
||
| parameters: | ||
| - name: "debug" | ||
| displayName: "Enable debug output" | ||
| type: boolean | ||
| default: false | ||
|
|
||
| variables: | ||
| CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] | ||
| system.debug: ${{ parameters.debug }} | ||
| WindowsContainerImage: "onebranch.azurecr.io/windows/ltsc2022/vse2022:latest" | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: templates | ||
| type: git | ||
| name: OneBranch.Pipelines/GovernedTemplates | ||
| ref: refs/heads/main | ||
|
|
||
| extends: | ||
| template: v2/OneBranch.Official.CrossPlat.yml@templates | ||
| parameters: | ||
| cloudvault: | ||
| enabled: false | ||
| globalSdl: | ||
| asyncSdl: | ||
| enabled: false | ||
| tsa: | ||
| enabled: false | ||
| credscan: | ||
| suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/compliance/CredScanSuppressions.json | ||
| policheck: | ||
| break: true | ||
| suppression: | ||
| suppressionFile: $(Build.SourcesDirectory)/.config/guardian/.gdnsuppress | ||
| codeql: | ||
| compiled: | ||
| enabled: false | ||
| tsaEnabled: false | ||
| componentgovernance: | ||
| ignoreDirectories: $(Build.SourcesDirectory)/.vscode-test | ||
| featureFlags: | ||
| linuxEsrpSigning: true | ||
| WindowsHostVersion: | ||
| Version: 2022 | ||
|
|
||
| stages: | ||
| - stage: BuildStage | ||
| jobs: | ||
| - job: Main | ||
| pool: | ||
| type: windows | ||
| variables: | ||
| ob_outputDirectory: '$(Build.ArtifactStagingDirectory)\build' | ||
| steps: | ||
| - pwsh: Write-Output "Dummy build pipeline - configuration validated successfully" | ||
| displayName: "\U00002705 Dummy step" | ||
| # Build pipeline for npm packages in the packages/ folder | ||
| # Produces .tgz archives that can be published via the npm release pipeline. | ||
| # | ||
| # Scope: only packages in $publishablePackages (below) are packed and shipped | ||
| # as release artifacts. Today this is just packages/vscode-ext-webview | ||
| # (which publishes to the @microsoft scope on npm). The other workspace | ||
| # packages are still built and tested by 'npm run build/test --workspaces' | ||
| # so the monorepo stays healthy, but they are NOT packed - they are local- | ||
| # only deps and not released through this pipeline. | ||
|
|
||
| # Manual-only build. The build/test work here is already covered on every push | ||
| # by the GitHub Actions CI (.github/workflows/main.yml) and the main extension | ||
| # ADO pipeline (.azure-pipelines/build.yml, which also runs Component Governance | ||
| # / CredScan / PoliCheck over the same monorepo). The ONLY unique output of this | ||
| # pipeline is the packed .tgz release artifact, which is only ever consumed by | ||
| # release-npm-packages.yml. So there is no reason to run it continuously. | ||
| # | ||
| # Release procedure: queue this pipeline manually, wait for it to succeed, then | ||
| # queue release-npm-packages.yml (which picks up the latest successful run of | ||
| # this pipeline via its 'npmBuild' pipeline resource). | ||
| trigger: none | ||
|
|
||
| # Disable PR trigger | ||
| pr: none | ||
|
|
||
| parameters: | ||
| - name: 'debug' | ||
| displayName: 'Enable debug output' | ||
| type: boolean | ||
| default: false | ||
| - name: isOfficialBuild | ||
| displayName: 'Official Build' | ||
| type: boolean | ||
| default: true | ||
|
|
||
| variables: | ||
| CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning | ||
| system.debug: ${{ parameters.debug }} | ||
|
|
||
| WindowsContainerImage: 'onebranch.azurecr.io/windows/ltsc2022/vse2022:latest' # Docker image which is used to build the project https://aka.ms/obpipelines/containers | ||
|
|
||
| resources: | ||
| repositories: | ||
| - repository: templates | ||
| type: git | ||
| name: OneBranch.Pipelines/GovernedTemplates | ||
| ref: refs/heads/main | ||
|
|
||
| extends: | ||
| ${{ if eq(parameters.isOfficialBuild, true) }}: | ||
| template: v2/OneBranch.Official.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates | ||
| ${{ else }}: | ||
| template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates # https://aka.ms/obpipelines/templates | ||
| parameters: | ||
| cloudvault: # https://aka.ms/obpipelines/cloudvault | ||
| enabled: false | ||
| globalSdl: # https://aka.ms/obpipelines/sdl | ||
| asyncSdl: | ||
| enabled: false | ||
| tsa: | ||
| enabled: false | ||
| credscan: | ||
| suppressionsFile: $(Build.SourcesDirectory)/.azure-pipelines/compliance/CredScanSuppressions.json | ||
| policheck: | ||
| break: true | ||
| suppression: | ||
| suppressionFile: $(Build.SourcesDirectory)/.config/guardian/.gdnsuppress | ||
| codeql: | ||
| compiled: | ||
| enabled: false | ||
| tsaEnabled: false | ||
| componentgovernance: | ||
| ignoreDirectories: $(Build.SourcesDirectory)/.vscode-test | ||
| featureFlags: | ||
| linuxEsrpSigning: true | ||
| WindowsHostVersion: | ||
| Version: 2022 | ||
|
|
||
| stages: | ||
| - stage: BuildStage | ||
| jobs: | ||
| - job: Main | ||
| pool: | ||
| type: windows | ||
| variables: | ||
| ob_outputDirectory: '$(Build.ArtifactStagingDirectory)\build' # this directory is uploaded to pipeline artifacts. More info at https://aka.ms/obpipelines/artifacts | ||
| ob_sdl_codeSignValidation_excludes: '-|**\*.json;-|**\*.js;-|**\node_modules\**;' | ||
| steps: | ||
| - task: ComponentGovernanceComponentDetection@0 | ||
| displayName: 'Component Governance - Component Detection' | ||
|
|
||
| - task: NodeTool@0 | ||
| displayName: "Use Node.js" | ||
| inputs: | ||
| versionSource: fromFile | ||
| versionFilePath: .nvmrc | ||
|
|
||
| - task: npmAuthenticate@0 | ||
| displayName: "Authenticate to npm registry" | ||
| inputs: | ||
| workingFile: '$(Build.SourcesDirectory)/.azure-pipelines/.npmrc' | ||
|
|
||
| - task: Npm@1 | ||
| displayName: "Install Dependencies" | ||
| condition: succeeded() | ||
| inputs: | ||
| command: custom | ||
| customCommand: ci --userconfig $(Build.SourcesDirectory)/.azure-pipelines/.npmrc | ||
| workingDir: $(Build.SourcesDirectory) | ||
|
|
||
| - task: Npm@1 | ||
| displayName: "Build Workspace Packages" | ||
| condition: succeeded() | ||
| inputs: | ||
| command: custom | ||
| customCommand: run build --workspaces --if-present | ||
| workingDir: $(Build.SourcesDirectory) | ||
|
|
||
| - task: Npm@1 | ||
| displayName: "Test Workspace Packages" | ||
| condition: succeeded() | ||
| inputs: | ||
| command: custom | ||
| customCommand: run test --workspaces --if-present | ||
| workingDir: $(Build.SourcesDirectory) | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: "Pack npm packages" | ||
| condition: succeeded() | ||
| inputs: | ||
| targetType: 'filePath' | ||
| filePath: '$(Build.SourcesDirectory)/.azure-pipelines/scripts/pack-npm-packages.ps1' | ||
| arguments: >- | ||
| -SourcesDirectory '$(Build.SourcesDirectory)' | ||
| -OutputDirectory '$(ob_outputDirectory)' | ||
| -SummaryPath '$(Build.ArtifactStagingDirectory)\pack-summary.md' | ||
|
|
||
| - task: CopyFiles@2 | ||
| displayName: "Copy package metadata to staging" | ||
| condition: succeeded() | ||
| inputs: | ||
| Contents: | | ||
| packages/vscode-ext-webview/package.json | ||
| !**/node_modules/** | ||
| TargetFolder: $(ob_outputDirectory) | ||
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.