Skip to content

Commit 3a20e76

Browse files
authored
Support for multiple destinations for GitHubVulnerabilities2v3 job (#10741)
* Configuration update. * BlobStorageVulnerabilityWriter with secondary storage.
1 parent 3f86b8d commit 3a20e76

6 files changed

Lines changed: 566 additions & 98 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace GitHubVulnerabilities2v3.Configuration
5+
{
6+
public class DestinationConfiguration
7+
{
8+
/// <summary>
9+
/// The storage connection to use to save the job's output.
10+
/// </summary>
11+
public string StorageConnectionString { get; set; }
12+
13+
/// <summary>
14+
/// Base URL to use for absolute URLs of child documents.
15+
/// </summary>
16+
public string V3BaseUrl { get; set; }
17+
}
18+
}

src/GitHubVulnerabilities2v3/Configuration/GitHubVulnerabilities2v3Configuration.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
using System.Collections.Generic;
45
using NuGet.Services.GitHub.Configuration;
56

67
namespace GitHubVulnerabilities2v3.Configuration
78
{
89
public class GitHubVulnerabilities2v3Configuration : GraphQLQueryConfiguration
910
{
10-
/// <summary>
11-
/// The storage connection to use to save the job's output.
12-
/// </summary>
13-
public string StorageConnectionString { get; set; }
11+
public IReadOnlyList<DestinationConfiguration> Destinations { get; set; }
1412

1513
/// <summary>
1614
/// The storage container to save the job's output in.
1715
/// </summary>
1816
public string V3VulnerabilityContainerName { get; set; } = "v3-vulnerabilities";
1917

20-
/// <summary>
21-
/// Service Index Root
22-
/// </summary>
23-
public string V3BaseUrl { get; set; } = "https://api.nuget.org/";
24-
2518
/// <summary>
2619
/// The name of the blob to save the job's advisories cursor in.
2720
/// </summary>

0 commit comments

Comments
 (0)