Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Commit

Permalink
Update servercommon to 2.68.0 and Jobs.Common dependencies with updat…
Browse files Browse the repository at this point in the history
…e d servercommon (#740)
  • Loading branch information
shishirx34 authored Feb 10, 2020
1 parent 2342616 commit f91f67b
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/Catalog/NuGet.Services.Metadata.Catalog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
<Version>4.4.5-dev-3213233</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Sql">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="NuGet.StrongName.json-ld.net">
<Version>1.0.6</Version>
Expand All @@ -309,7 +309,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Services.Logging">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="WindowsAzure.Storage">
<Version>9.3.3</Version>
Expand Down
2 changes: 2 additions & 0 deletions src/Ng/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ public static class Arguments

#region KeyVault
public const string VaultName = "vaultName";
public const string UseManagedIdentity = "useManagedIdentity";

public const string ClientId = "clientId";

public const string StoreName = "storeName";
Expand Down
25 changes: 17 additions & 8 deletions src/Ng/CommandHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,23 @@ private static ISecretInjector GetSecretInjector(IDictionary<string, string> arg
}
else
{
var clientId = arguments.GetOrThrow<string>(Arguments.ClientId);
var certificateThumbprint = arguments.GetOrThrow<string>(Arguments.CertificateThumbprint);
var storeName = arguments.GetOrDefault(Arguments.StoreName, StoreName.My);
var storeLocation = arguments.GetOrDefault(Arguments.StoreLocation, StoreLocation.LocalMachine);
var shouldValidateCert = arguments.GetOrDefault(Arguments.ValidateCertificate, true);

var keyVaultCertificate = CertificateUtility.FindCertificateByThumbprint(storeName, storeLocation, certificateThumbprint, shouldValidateCert);
var keyVaultConfig = new KeyVaultConfiguration(vaultName, clientId, keyVaultCertificate);
var useManagedIdentity = arguments.GetOrDefault<bool>(Arguments.UseManagedIdentity);
KeyVaultConfiguration keyVaultConfig;
if (useManagedIdentity)
{
keyVaultConfig = new KeyVaultConfiguration(vaultName);
}
else
{
var clientId = arguments.GetOrThrow<string>(Arguments.ClientId);
var certificateThumbprint = arguments.GetOrThrow<string>(Arguments.CertificateThumbprint);
var storeName = arguments.GetOrDefault(Arguments.StoreName, StoreName.My);
var storeLocation = arguments.GetOrDefault(Arguments.StoreLocation, StoreLocation.LocalMachine);
var shouldValidateCert = arguments.GetOrDefault(Arguments.ValidateCertificate, true);

var keyVaultCertificate = CertificateUtility.FindCertificateByThumbprint(storeName, storeLocation, certificateThumbprint, shouldValidateCert);
keyVaultConfig = new KeyVaultConfiguration(vaultName, clientId, keyVaultCertificate);
}

secretReader = new CachingSecretReader(new KeyVaultReader(keyVaultConfig),
arguments.GetOrDefault(Arguments.RefreshIntervalSec, CachingSecretReader.DefaultRefreshIntervalSec));
Expand Down
5 changes: 3 additions & 2 deletions src/Ng/Jobs/Catalog2DnxJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public override string GetUsage()
+ $"-{Arguments.StorageContainer} <azure-container> "
+ $"-{Arguments.StoragePath} <path> "
+ $"[-{Arguments.VaultName} <keyvault-name> "
+ $"-{Arguments.ClientId} <keyvault-client-id> "
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> "
+ $"-{Arguments.UseManagedIdentity} true|false "
+ $"-{Arguments.ClientId} <keyvault-client-id> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"[-{Arguments.ValidateCertificate} true|false]]] "
+ $"[-{Arguments.Verbose} true|false] "
+ $"[-{Arguments.Interval} <seconds>]"
Expand Down
5 changes: 3 additions & 2 deletions src/Ng/Jobs/Catalog2RegistrationJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ public override string GetUsage()
+ $"-{Arguments.StorageContainer} <azure-container> "
+ $"-{Arguments.StoragePath} <path> "
+ $"[-{Arguments.VaultName} <keyvault-name> "
+ $"-{Arguments.ClientId} <keyvault-client-id> "
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> "
+ $"-{Arguments.UseManagedIdentity} true|false "
+ $"-{Arguments.ClientId} <keyvault-client-id> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"[-{Arguments.ValidateCertificate} true|false]]] "
+ $"[-{Arguments.Verbose} true|false] "
+ $"[-{Arguments.Interval} <seconds>]"
Expand Down
5 changes: 3 additions & 2 deletions src/Ng/Jobs/Db2CatalogJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ public override string GetUsage()
+ $"-{Arguments.StorageContainer} <azure-container> "
+ $"-{Arguments.StoragePath} <path> "
+ $"[-{Arguments.VaultName} <keyvault-name> "
+ $"-{Arguments.ClientId} <keyvault-client-id> "
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> "
+ $"-{Arguments.UseManagedIdentity} true|false "
+ $"-{Arguments.ClientId} <keyvault-client-id> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"[-{Arguments.ValidateCertificate} true|false]]] "
+ $"-{Arguments.StorageTypeAuditing} file|azure "
+ $"[-{Arguments.StoragePathAuditing} <path>]"
Expand Down
5 changes: 3 additions & 2 deletions src/Ng/Jobs/NgJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ public static string GetUsageBase()
{
return "Usage: ng [" + string.Join("|", NgJobFactory.JobMap.Keys) + "] "
+ $"[-{Arguments.VaultName} <keyvault-name> "
+ $"-{Arguments.ClientId} <keyvault-client-id> "
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> "
+ $"-{Arguments.UseManagedIdentity} true|false "
+ $"-{Arguments.ClientId} <keyvault-client-id> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"-{Arguments.CertificateThumbprint} <keyvault-certificate-thumbprint> Should not be set if {Arguments.UseManagedIdentity} is true"
+ $"[-{Arguments.ValidateCertificate} true|false]]";
}

Expand Down
8 changes: 4 additions & 4 deletions src/Ng/Ng.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,16 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Services.Configuration">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Logging">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Sql">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Storage">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="Serilog.Sinks.File">
<Version>4.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Services.Storage">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 12 additions & 0 deletions src/NuGet.Services.SearchService/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NuGet.Services.ServiceBus" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.68.0.0" newVersion="2.68.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Services.Contracts" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.68.0.0" newVersion="2.68.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.6.0" newVersion="5.2.6.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-9.3.2.0" newVersion="9.3.2.0"/>
Expand Down
2 changes: 1 addition & 1 deletion src/NuGet.Services.V3/NuGet.Services.V3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Services.Validation.Common.Job">
<Version>4.3.0-dev-3391439</Version>
<Version>4.3.0-dev-3453620</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/CatalogTests/CatalogTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Logging">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.1</Version>
Expand Down
4 changes: 2 additions & 2 deletions tests/NgTests/NgTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@
<Version>4.10.1</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Configuration">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Logging">
<Version>2.66.0</Version>
<Version>2.68.0</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.4.1</Version>
Expand Down

0 comments on commit f91f67b

Please sign in to comment.