Use trimmed packages to speedup runner updates (#1568)

* consume trimmed packages.

* .

* .

* .

* .
This commit is contained in:
Tingluo Huang
2022-01-10 21:24:55 -05:00
committed by GitHub
parent 3b8475de3e
commit 7616e9b7aa
4 changed files with 1272 additions and 130 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;
@@ -110,5 +111,43 @@ namespace GitHub.DistributedTask.WebApi
get;
set;
}
/// <summary>
/// A set of trimmed down packages:
/// - the package without 'externals'
/// - the package without 'dotnet runtime'
/// - the package without 'dotnet runtime' and 'externals'
/// </summary>
[DataMember(EmitDefaultValue = false)]
public List<TrimmedPackageMetadata> TrimmedPackages
{
get;
set;
}
}
[DataContract]
public class TrimmedPackageMetadata
{
[DataMember(EmitDefaultValue = false)]
public string HashValue { get; set; }
[DataMember(EmitDefaultValue = false)]
public string DownloadUrl { get; set; }
public Dictionary<string, string> TrimmedContents
{
get
{
if (m_trimmedContents == null)
{
m_trimmedContents = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
return m_trimmedContents;
}
}
[DataMember(Name = "TrimmedContents", EmitDefaultValue = false)]
private Dictionary<string, string> m_trimmedContents;
}
}