diff --git a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs
index 8cf716cf8c0..8991ca8b081 100644
--- a/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs
+++ b/src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs
@@ -124,6 +124,14 @@ public abstract class PublishArtifactsInManifestBase : Microsoft.Build.Utilities
private readonly string AzureDevOpsBaseUrl = $"https://dev.azure.com";
+ ///
+ /// Instead of relying on pre-downloaded artifacts, 'stream' artifacts in from the input build.
+ /// Artifacts are downloaded one by one from the input build, and then immediately published and deleted.
+ /// This allows for faster publishing by utilizing both upload and download pipes at the same time,
+ /// and reduces maximum disk usage.
+ /// This is not appplicable if the input build does not contain the artifacts for publishing
+ /// (e.g. when publishing post-build signed assets)
+ ///
public bool UseStreamingPublishing { get; set; }
public readonly Dictionary> FeedConfigs =
@@ -1853,14 +1861,14 @@ protected bool AnyMissingRequiredBaseProperties()
Log.LogError($"The property {nameof(BuildAssetRegistryToken)} is required but doesn't have a value set.");
}
- if (string.IsNullOrEmpty(AzdoApiToken))
+ if (UseStreamingPublishing && string.IsNullOrEmpty(AzdoApiToken))
{
- Log.LogError($"The property {nameof(AzdoApiToken)} is required but doesn't have a value set.");
+ Log.LogError($"The property {nameof(AzdoApiToken)} is required when using streaming publishing, but doesn't have a value set.");
}
- if (string.IsNullOrEmpty(ArtifactsBasePath))
+ if (UseStreamingPublishing && string.IsNullOrEmpty(ArtifactsBasePath))
{
- Log.LogError($"The property {nameof(ArtifactsBasePath)} is required but doesn't have a value set.");
+ Log.LogError($"The property {nameof(ArtifactsBasePath)} is required when using streaming publishing, but doesn't have a value set.");
}
return Log.HasLoggedErrors;
}