Skip to content

Commit

Permalink
Fix Build Failures if there are no packages produced in the release b…
Browse files Browse the repository at this point in the history
…ranch (dotnet#57311)

* no packages

* Update eng/pipelines/libraries/build-job.yml

Co-authored-by: Santiago Fernandez Madero <[email protected]>

* change parameter name and add main condition to running of tests

* remove package testing condition as we no longer run package testing on helix

* Update eng/pipelines/libraries/build-job.yml

Co-authored-by: Santiago Fernandez Madero <[email protected]>

* Update upload-intermediate-artifacts-step.yml

Co-authored-by: Santiago Fernandez Madero <[email protected]>
  • Loading branch information
Anipik and safern authored Aug 13, 2021
1 parent af721d2 commit c29be0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/pipelines/common/upload-intermediate-artifacts-step.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
parameters:
name: ''
publishPackagesCondition: always()

steps:
- task: CopyFiles@2
displayName: Prepare job-specific intermediate artifacts subdirectory
condition: and(succeeded(), ${{ parameters.publishPackagesCondition }})
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages/$(_BuildConfig)'
Contents: |
Expand Down
5 changes: 5 additions & 0 deletions eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ jobs:
- template: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
parameters:
name: Libraries_AllConfigurations
publishPackagesCondition: >-
or(
eq(variables['_librariesBuildProducedPackages'], true),
eq(variables['Build.SourceBranchName'], 'main'),
eq(variables['System.PullRequest.TargetBranch'], 'main'))
- ${{ if and(eq(parameters.runTests, true), eq(parameters.useHelix, true)) }}:
- template: /eng/pipelines/libraries/helix.yml
Expand Down

0 comments on commit c29be0a

Please sign in to comment.