Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ public abstract class PublishArtifactsInManifestBase : Microsoft.Build.Utilities

private readonly string AzureDevOpsBaseUrl = $"https://dev.azure.com";

/// <summary>
/// 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)
/// </summary>
public bool UseStreamingPublishing { get; set; }

public readonly Dictionary<TargetFeedContentType, HashSet<TargetFeedConfig>> FeedConfigs =
Expand Down Expand Up @@ -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;
}
Expand Down