From 1e9b2636e6a563a7662c48e37f475d88d1335013 Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Fri, 15 Mar 2019 16:06:57 -0700 Subject: [PATCH 1/5] Sign the NuGet packages produced by the build (#724) Progress on https://github.com/NuGet/Engineering/issues/2244 F --- .nuget/packages.config | 1 + build.ps1 | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.nuget/packages.config b/.nuget/packages.config index 58f19ba19..bb7daf160 100644 --- a/.nuget/packages.config +++ b/.nuget/packages.config @@ -1,5 +1,6 @@ + \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index ef83946bf..714fcad3e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -9,7 +9,7 @@ param ( [string]$SemanticVersion = '1.0.0-zlocal', [string]$Branch = 'zlocal', [string]$CommitSHA, - [string]$BuildBranch = 'b5f9d1c89da96c462935e2195ceb00e69287b93e' + [string]$BuildBranch = '2d8feecabe3aeaed7f5b4d50b9be78c94faf39ec' ) $msBuildVersion = 15; @@ -170,6 +170,11 @@ Invoke-BuildStep 'Creating artifacts' { } ` -ev +BuildErrors +Invoke-BuildStep 'Signing the packages' { + Sign-Packages -Configuration $Configuration -BuildNumber $BuildNumber -MSBuildVersion $msBuildVersion ` + } ` + -ev +BuildErrors + Trace-Log ('-' * 60) ## Calculating Build time From 62a99d87b6009f8089405baa52046ccfc5c9509e Mon Sep 17 00:00:00 2001 From: Xavier Decoster Date: Tue, 19 Mar 2019 08:30:38 -0700 Subject: [PATCH 2/5] Upgrade SharpZipLib dependency to v1.1.0 (#726) --- .../Validation.PackageSigning.ProcessSignature.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Validation.PackageSigning.ProcessSignature.Tests/Validation.PackageSigning.ProcessSignature.Tests.csproj b/tests/Validation.PackageSigning.ProcessSignature.Tests/Validation.PackageSigning.ProcessSignature.Tests.csproj index 1920ca605..d456f3b94 100644 --- a/tests/Validation.PackageSigning.ProcessSignature.Tests/Validation.PackageSigning.ProcessSignature.Tests.csproj +++ b/tests/Validation.PackageSigning.ProcessSignature.Tests/Validation.PackageSigning.ProcessSignature.Tests.csproj @@ -63,7 +63,7 @@ 1.8.1.3 - 0.86.0 + 1.1.0 2.3.1 From eda6b59b3b2fa038c868633df0d3eae66af7bbc8 Mon Sep 17 00:00:00 2001 From: Andrei Grigorev Date: Tue, 19 Mar 2019 15:40:24 -0700 Subject: [PATCH 3/5] SMTP cleanup (#728) * Gallery.CredentialExpiration * Destroying last references to anything "Smtp". --- .../Scripts/Gallery.CredentialExpiration.cmd | 2 - .../Settings/int.json | 1 - .../Settings/prod.json | 1 - .../Configuration/JobArgumentNames.cs | 1 - .../NuGet.Jobs.Common.csproj | 1 - src/NuGet.Jobs.Common/SmtpUri.cs | 45 ------------------- .../settings.json | 3 -- .../symbolsettings.json | 3 -- .../JobArgumentNames.cs | 1 - 9 files changed, 58 deletions(-) delete mode 100644 src/NuGet.Jobs.Common/SmtpUri.cs diff --git a/src/Gallery.CredentialExpiration/Scripts/Gallery.CredentialExpiration.cmd b/src/Gallery.CredentialExpiration/Scripts/Gallery.CredentialExpiration.cmd index 3d6a98472..6098b278e 100644 --- a/src/Gallery.CredentialExpiration/Scripts/Gallery.CredentialExpiration.cmd +++ b/src/Gallery.CredentialExpiration/Scripts/Gallery.CredentialExpiration.cmd @@ -7,8 +7,6 @@ cd bin title #{Jobs.gallery.credentialexpiration.Title} - REM SmtpUri is expected to be of the format: smtps://username:password@host:port. Note that if username contains an "@", you need to URI encode it! - start /w gallery.credentialexpiration.exe -Configuration "#{Jobs.gallery.credentialexpiration.Configuration}" -InstrumentationKey "#{Jobs.gallery.credentialexpiration.InstrumentationKey}" -verbose true -Interval #{Jobs.gallery.credentialexpiration.Interval} echo "Finished #{Jobs.gallery.credentialexpiration.Title}" diff --git a/src/Gallery.CredentialExpiration/Settings/int.json b/src/Gallery.CredentialExpiration/Settings/int.json index 25889b6e4..9ba2b76d4 100644 --- a/src/Gallery.CredentialExpiration/Settings/int.json +++ b/src/Gallery.CredentialExpiration/Settings/int.json @@ -7,7 +7,6 @@ "GalleryAccountUrl": "https://int.nugettest.org/account/ApiKeys", "GalleryBrand": "NuGet Gallery", "MailFrom": "support@nuget.org", - "SmtpUri": "#{Jobs.gallery.credentialexpiration.SmtpUri}", "WarnDaysBeforeExpiration": 7, "WhatIf": true }, diff --git a/src/Gallery.CredentialExpiration/Settings/prod.json b/src/Gallery.CredentialExpiration/Settings/prod.json index 4f9b67756..72b536172 100644 --- a/src/Gallery.CredentialExpiration/Settings/prod.json +++ b/src/Gallery.CredentialExpiration/Settings/prod.json @@ -7,7 +7,6 @@ "GalleryAccountUrl": "https://www.nuget.org/account/ApiKeys", "GalleryBrand": "NuGet Gallery", "MailFrom": "support@nuget.org", - "SmtpUri": "#{Jobs.gallery.credentialexpiration.SmtpUri}", "WarnDaysBeforeExpiration": 7, "WhatIf": false }, diff --git a/src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs b/src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs index cf2e4b799..678ebf7f9 100644 --- a/src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs +++ b/src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs @@ -111,7 +111,6 @@ public static class JobArgumentNames // Arguments specific to e-mail public const string MailFrom = "MailFrom"; - public const string SmtpUri = "SmtpUri"; // Arguments specific to StatusAggregator public const string StatusStorageAccount = "StatusStorageAccount"; diff --git a/src/NuGet.Jobs.Common/NuGet.Jobs.Common.csproj b/src/NuGet.Jobs.Common/NuGet.Jobs.Common.csproj index dff362c5d..472bef139 100644 --- a/src/NuGet.Jobs.Common/NuGet.Jobs.Common.csproj +++ b/src/NuGet.Jobs.Common/NuGet.Jobs.Common.csproj @@ -63,7 +63,6 @@ - diff --git a/src/NuGet.Jobs.Common/SmtpUri.cs b/src/NuGet.Jobs.Common/SmtpUri.cs deleted file mode 100644 index 9dfaf51de..000000000 --- a/src/NuGet.Jobs.Common/SmtpUri.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Net; -using System.Text.RegularExpressions; - -namespace NuGet.Jobs -{ - public class SmtpUri - { - private static readonly Regex _userInfoParser = new Regex("^(?[^:]*):(?.*)$"); - - public string UserName { get; private set; } - public string Password { get; private set; } - public string Host { get; private set; } - public int Port { get; private set; } - public bool Secure { get; private set; } - - public SmtpUri(Uri uri) - { - Secure = uri.Scheme.Equals("smtps", StringComparison.OrdinalIgnoreCase); - if (!Secure && !uri.Scheme.Equals("smtp", StringComparison.OrdinalIgnoreCase)) - { - throw new FormatException($"Invalid SMTP URL: {uri}"); - } - - var m = _userInfoParser.Match(uri.UserInfo); - if (m.Success) - { - UserName = WebUtility.UrlDecode(m.Groups["username"].Value); - Password = WebUtility.UrlDecode(m.Groups["password"].Value); - } - else - { - UserName = WebUtility.UrlDecode(uri.UserInfo); - } - - Host = uri.Host; - Port = uri.IsDefaultPort - ? 25 - : uri.Port; - } - } -} diff --git a/src/NuGet.Services.Validation.Orchestrator/settings.json b/src/NuGet.Services.Validation.Orchestrator/settings.json index d4dd614e6..0344920e9 100644 --- a/src/NuGet.Services.Validation.Orchestrator/settings.json +++ b/src/NuGet.Services.Validation.Orchestrator/settings.json @@ -85,9 +85,6 @@ "TopicPath": "", "SubscriptionName": "" }, - "Smtp": { - "SmtpUri": "" - }, "Email": { "GalleryOwner": "NuGet Gallery ", "GalleryNoReplyAddress": "NuGet Gallery ", diff --git a/src/NuGet.Services.Validation.Orchestrator/symbolsettings.json b/src/NuGet.Services.Validation.Orchestrator/symbolsettings.json index 70eb1cd9b..2b053f48d 100644 --- a/src/NuGet.Services.Validation.Orchestrator/symbolsettings.json +++ b/src/NuGet.Services.Validation.Orchestrator/symbolsettings.json @@ -86,9 +86,6 @@ "TopicPath": "symbol-orchestrator", "SubscriptionName": "orchestrator" }, - "Smtp": { - "SmtpUri": "" - }, "Email": { "GalleryOwner": "NuGet Gallery ", "GalleryNoReplyAddress": "NuGet Gallery ", diff --git a/src/NuGet.SupportRequests.Notifications/JobArgumentNames.cs b/src/NuGet.SupportRequests.Notifications/JobArgumentNames.cs index 5009a6ad7..e499cc6c6 100644 --- a/src/NuGet.SupportRequests.Notifications/JobArgumentNames.cs +++ b/src/NuGet.SupportRequests.Notifications/JobArgumentNames.cs @@ -10,6 +10,5 @@ internal static class JobArgumentNames // avoids value duplication, avoids annoying namespace conflicts in this job public const string InstrumentationKey = Jobs.JobArgumentNames.InstrumentationKey; public const string SourceDatabase = Jobs.JobArgumentNames.SourceDatabase; - public const string SmtpUri = Jobs.JobArgumentNames.SmtpUri; } } \ No newline at end of file From d129fc8ad9bddfec9b0454cb7ea24fb81425e523 Mon Sep 17 00:00:00 2001 From: Svetlana Kofman Date: Tue, 19 Mar 2019 15:41:46 -0700 Subject: [PATCH 4/5] Use nuget V3 api for restore * Fix build warning and move build to use nuget V3 api * fix nuget.config * undo project change --- .nuget/NuGet.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nuget/NuGet.config b/.nuget/NuGet.config index 69b92e670..4f57ab374 100644 --- a/.nuget/NuGet.config +++ b/.nuget/NuGet.config @@ -5,7 +5,7 @@ - + From 6046335fd5947c1e7f9423bf2fe67b92085beae3 Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Thu, 21 Mar 2019 09:15:22 -0700 Subject: [PATCH 5/5] Enable signing on NuGetCDNRedirect and move to PackageReference (#731) Progress on https://github.com/NuGet/Engineering/issues/2097 Progress on https://github.com/NuGet/Engineering/issues/2243 --- .../ApplicationInsights.config | 2 +- src/NuGetCDNRedirect/NuGetCDNRedirect.csproj | 172 ++++-------------- src/NuGetCDNRedirect/Web.config | 48 ++--- src/NuGetCDNRedirect/packages.config | 46 ----- 4 files changed, 54 insertions(+), 214 deletions(-) delete mode 100644 src/NuGetCDNRedirect/packages.config diff --git a/src/NuGetCDNRedirect/ApplicationInsights.config b/src/NuGetCDNRedirect/ApplicationInsights.config index e0b526d25..7aaf5e6d5 100644 --- a/src/NuGetCDNRedirect/ApplicationInsights.config +++ b/src/NuGetCDNRedirect/ApplicationInsights.config @@ -85,7 +85,7 @@ - 100 + 5 diff --git a/src/NuGetCDNRedirect/NuGetCDNRedirect.csproj b/src/NuGetCDNRedirect/NuGetCDNRedirect.csproj index b01b63f2b..39c69f1be 100644 --- a/src/NuGetCDNRedirect/NuGetCDNRedirect.csproj +++ b/src/NuGetCDNRedirect/NuGetCDNRedirect.csproj @@ -1,7 +1,5 @@  - - Debug @@ -47,76 +45,10 @@ 4 - - ..\..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.4.0\lib\net45\Microsoft.AI.Agent.Intercept.dll - - - ..\..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.4.1\lib\net45\Microsoft.AI.DependencyCollector.dll - - - ..\..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.4.1\lib\net45\Microsoft.AI.PerfCounterCollector.dll - - - ..\..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.4.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll - - - ..\..\packages\Microsoft.ApplicationInsights.Web.2.4.1\lib\net45\Microsoft.AI.Web.dll - - - ..\..\packages\Microsoft.ApplicationInsights.WindowsServer.2.4.1\lib\net45\Microsoft.AI.WindowsServer.dll - - - ..\..\packages\Microsoft.ApplicationInsights.2.4.0\lib\net46\Microsoft.ApplicationInsights.dll - - - ..\..\packages\Microsoft.AspNet.TelemetryCorrelation.1.0.0\lib\net45\Microsoft.AspNet.TelemetryCorrelation.dll - - - ..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.5\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - - ..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\..\packages\Microsoft.Extensions.Logging.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.dll - - - ..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll - - - ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\..\packages\NuGet.Services.Logging.2.2.3\lib\net452\NuGet.Services.Logging.dll - - - ..\..\packages\Serilog.2.0.0\lib\net45\Serilog.dll - - - ..\..\packages\Serilog.Enrichers.Environment.2.1.0\lib\net45\Serilog.Enrichers.Environment.dll - - - ..\..\packages\Serilog.Enrichers.Process.2.0.0\lib\net45\Serilog.Enrichers.Process.dll - - - ..\..\packages\Serilog.Extensions.Logging.1.2.0\lib\net45\Serilog.Extensions.Logging.dll - - - ..\..\packages\Serilog.Sinks.ApplicationInsights.2.2.1\lib\net45\Serilog.Sinks.ApplicationInsights.dll - - - ..\..\packages\Serilog.Sinks.ColoredConsole.2.0.0\lib\net45\Serilog.Sinks.ColoredConsole.dll - - - ..\..\packages\SerilogTraceListener.2.0.10027\lib\net45\SerilogTraceListener.dll - - - ..\..\packages\System.Diagnostics.DiagnosticSource.4.4.0\lib\net46\System.Diagnostics.DiagnosticSource.dll - @@ -130,50 +62,9 @@ - - True - ..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - - - - - True - ..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll - - - True - ..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll - - - ..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll - - - True - ..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll - - - True - ..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll - - - True - ..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll - - - True - ..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll - + + - - True - ..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll - - - True - ..\..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll - @@ -194,12 +85,6 @@ PreserveNewest - - Web.config - - - Web.config - @@ -212,12 +97,34 @@ + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + + 2.4.0 + + + 2.4.1 + + + 5.2.3 + + + 1.1.3 + + + 1.0.5 + + + 9.0.1 + + - - Designer - @@ -227,6 +134,18 @@ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + + + + @@ -250,17 +169,4 @@ - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/src/NuGetCDNRedirect/Web.config b/src/NuGetCDNRedirect/Web.config index bbb93dd44..b4dca096a 100644 --- a/src/NuGetCDNRedirect/Web.config +++ b/src/NuGetCDNRedirect/Web.config @@ -26,38 +26,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -67,7 +35,7 @@ - + @@ -81,4 +49,16 @@ - \ No newline at end of file + + + + + + + + + + + + + diff --git a/src/NuGetCDNRedirect/packages.config b/src/NuGetCDNRedirect/packages.config deleted file mode 100644 index 2c7b14a34..000000000 --- a/src/NuGetCDNRedirect/packages.config +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file