From f77c8f486331d9fc1a699e2370a7dd185619790e Mon Sep 17 00:00:00 2001 From: Hariharan Seshadri Date: Fri, 7 Apr 2023 22:13:39 -0700 Subject: [PATCH] Fix Npm packaging pipeline (#15425) ### Description It seems like https://github.com/microsoft/onnxruntime/pull/15329 re-worked some jobs in `react-native-ci.yml` into stages. When this template is used from within `npm-packaging-pipeline.yml`, there is problem in that there is a stage that contains multiple stages as jobs. Per my understanding, this is not acceptable to Azure DevOps. So, re-working some portion of `npm-packaging-pipeline.yml` to accomadate changes in https://github.com/microsoft/onnxruntime/pull/15329 ### Motivation and Context Fix NPM packaging pipeline Validating test run with fix: https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=297391&view=results --- .../azure-pipelines/npm-packaging-pipeline.yml | 18 ++++++++---------- .../templates/react-native-ci.yml | 5 +++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/npm-packaging-pipeline.yml b/tools/ci_build/github/azure-pipelines/npm-packaging-pipeline.yml index b2e5edc15c..0a8794ac5a 100644 --- a/tools/ci_build/github/azure-pipelines/npm-packaging-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/npm-packaging-pipeline.yml @@ -44,19 +44,17 @@ stages: PoolName: 'Win-CPU-2021' PackageName: 'onnxruntime-web' -- stage: Build_React_Native - dependsOn: Extract_commit - jobs: - - template: templates/react-native-ci.yml - parameters: - NpmPackagingMode: ${{ variables.NpmPackagingMode }} - BuildConfig: 'Release' - PoolName: 'Linux-CPU' - PackageName: 'onnxruntime-react-native' +- template: templates/react-native-ci.yml + parameters: + NpmPackagingMode: ${{ variables.NpmPackagingMode }} + BuildConfig: 'Release' + PoolName: 'Linux-CPU' + PackageName: 'onnxruntime-react-native' + BuildAndroidAARStageDependsOn: 'Extract_commit' - stage: Download_Node_Package dependsOn: - - Build_React_Native + - ReactNative_CI - Build_web_Release - Build_web_Debug jobs: diff --git a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml index a4e4336f20..a4a741b333 100644 --- a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml @@ -19,10 +19,15 @@ parameters: displayName: 'Package name' type: string default: 'NPM_packages' +- name: BuildAndroidAARStageDependsOn + displayName: 'Stage the Build Android AAR stage depends on' + type: string + default: '' stages: - stage: Build_Android_AAR displayName: Build Android AAR + dependsOn: '${{parameters.BuildAndroidAARStageDependsOn}}' jobs: - template: android-java-api-aar.yml parameters: