Skip to content

Commit

Permalink
Set azure devops variable if any package reports are found and skip c…
Browse files Browse the repository at this point in the history
…opy packages base on that (dotnet#32083)

* Set azure devops variable if any package reports are found

* Run target in CI as well
  • Loading branch information
safern authored Feb 11, 2020
1 parent 93d2fea commit a498bc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eng/pipelines/libraries/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ jobs:
inputs:
sourceFolder: $(Build.SourcesDirectory)/artifacts/packages
targetFolder: $(Build.ArtifactStagingDirectory)/artifacts/packages

condition: and(succeeded(), eq(variables['_librariesBuildProducedPackages'], true))

- task: CopyFiles@2
displayName: Prepare tmp assets to publish
inputs:
Expand Down
10 changes: 10 additions & 0 deletions src/libraries/packages.builds
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,14 @@
</Target>

<Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />

<Target Name="SetAzureDevOpsVariableForBuiltPackages"
Condition="'$(ContinuousIntegrationBuild)' == 'true'"
AfterTargets="BuildAllProjects">
<ItemGroup>
<_PackageReports Include="$(PackageReportDir)*.json" />
</ItemGroup>

<Message Condition="'@(_PackageReports)' != ''" Importance="High" Text="##vso[task.setvariable variable=_librariesBuildProducedPackages]true" />
</Target>
</Project>

0 comments on commit a498bc5

Please sign in to comment.