mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-04 23:59:56 +00:00
Change how "NPM packaging pipeline" downloads packages from another pipeline (#17838)
### Description "NPM packaging pipeline" needs to download an artifact from "Zip-Nuget-Java-Nodejs Packaging Pipeline". It has been a long-time issue that they two pipelines often use different commit ids. This change declares 'Zip-Nuget-Java-Nodejs Packaging Pipeline' as a resource, so that "NPM packaging pipeline" will always fetch from the pipeline run that triggers this NPM pipeline. Their official document says: "When you define a resource trigger, if its pipeline resource is from the same repo as the current pipeline, triggering follows the same branch and commit on which the event is raised."
This commit is contained in:
parent
20798a9f03
commit
138ccecd22
1 changed files with 9 additions and 31 deletions
|
|
@ -9,11 +9,6 @@ parameters:
|
|||
- 'custom'
|
||||
default: 'nightly (@dev)'
|
||||
|
||||
- name: NodePipelineId
|
||||
displayName: 'Node npm package build Id'
|
||||
type: string
|
||||
default: 'latest'
|
||||
|
||||
variables:
|
||||
# pipeline should define the following varaibles
|
||||
# ExtraBuildArgs
|
||||
|
|
@ -29,6 +24,11 @@ variables:
|
|||
NpmPackagingMode: '$(VersionSuffix)'
|
||||
|
||||
resources:
|
||||
pipelines:
|
||||
- pipeline: build
|
||||
source: 'Zip-Nuget-Java-Nodejs Packaging Pipeline'
|
||||
trigger: true
|
||||
branch: main
|
||||
repositories:
|
||||
- repository: manylinux
|
||||
type: Github
|
||||
|
|
@ -65,35 +65,13 @@ stages:
|
|||
runCodesignValidationInjection: false
|
||||
timeoutInMinutes: 10
|
||||
steps:
|
||||
|
||||
- ${{ if eq(parameters.NodePipelineId, 'latest') }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: '530acbc4-21bc-487d-8cd8-348ff451d2ff'
|
||||
definition: '940'
|
||||
specificBuildWithTriggering: true
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/main'
|
||||
artifactName: 'NPM_packages'
|
||||
targetPath: '$(Pipeline.Workspace)'
|
||||
displayName: 'Download onnxruntime-node Pipeline Artifact'
|
||||
|
||||
- ${{ if ne(parameters.NodePipelineId, 'latest') }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: '530acbc4-21bc-487d-8cd8-348ff451d2ff'
|
||||
definition: '940'
|
||||
buildVersionToDownload: 'specific'
|
||||
pipelineId: '${{ parameters.NodePipelineId }}'
|
||||
artifactName: 'NPM_packages'
|
||||
targetPath: '$(Pipeline.Workspace)'
|
||||
displayName: 'Download onnxruntime-node Pipeline Artifact'
|
||||
- download: build
|
||||
artifact: 'NPM_packages'
|
||||
displayName: 'Download onnxruntime-node Pipeline Artifact'
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
sourceFolder: $(Pipeline.Workspace)
|
||||
sourceFolder: '$(Pipeline.Workspace)\build\NPM_packages'
|
||||
contents: onnxruntime-*.tgz
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)\node-artifacts
|
||||
displayName: 'Copy onnxruntime-node Artifacts'
|
||||
|
|
|
|||
Loading…
Reference in a new issue