Skip to content

Commit

Permalink
Move compliance check before publishing pipeline artifact (microsoft#…
Browse files Browse the repository at this point in the history
…17857)

### Description
<!-- Describe your changes. -->


### Motivation and Context
Compliance check would fail randomly but the stage couldn't be rerun if
the pipeline artifacts are already published.
There's the error like `Artifact xxxx already exists`.
We had to restart the whole pipeline if there's a random error in
compliance check.
  • Loading branch information
mszhanyi authored and kleiti committed Mar 22, 2024
1 parent 48d6f6a commit 90b9f4e
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ stages:
searchPattern: '**/*.pdb'
symbolServerType: teamServices

- ${{ if eq(parameters['DoCompliance'], 'true') }}:
- template: ../../templates/compliance.yml
parameters :
msbuildPlatform: ${{ parameters.sln_platform }}

- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

# Node.js Publish
- ${{ if eq(parameters['DoNodejsPack'], 'true') }}:
- task: BatchScript@1
Expand Down Expand Up @@ -285,15 +294,6 @@ stages:
targetPath: '$(Build.SourcesDirectory)\js\node\bin\napi-v3\win32\${{ parameters.sln_platform }}'
artifactName: 'drop-onnxruntime-nodejs-win-${{ parameters.sln_platform }}-dml'

- ${{ if eq(parameters['DoCompliance'], 'true') }}:
- template: ../../templates/compliance.yml
parameters :
msbuildPlatform: ${{ parameters.sln_platform }}

- template: ../../templates/component-governance-component-detection-steps.yml
parameters :
condition : 'succeeded'

- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()

0 comments on commit 90b9f4e

Please sign in to comment.