diff --git a/NuGet.Jobs.sln b/NuGet.Jobs.sln index 3f7683649..4727c79e7 100644 --- a/NuGet.Jobs.sln +++ b/NuGet.Jobs.sln @@ -57,8 +57,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Common", "src\Validation.Common\Validation.Common.csproj", "{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Callback.Vcs", "src\Validation.Callback.Vcs\Validation.Callback.Vcs.csproj", "{185EF6D4-2172-40B1-A80E-811CE9D85840}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Runner", "src\Validation.Runner\Validation.Runner.csproj", "{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gallery", "Gallery", "{88725659-D5F8-49F9-9B7E-D87C5B9917D7}" @@ -225,10 +223,6 @@ Global {2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU {2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU {2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.Build.0 = Release|Any CPU - {185EF6D4-2172-40B1-A80E-811CE9D85840}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {185EF6D4-2172-40B1-A80E-811CE9D85840}.Debug|Any CPU.Build.0 = Debug|Any CPU - {185EF6D4-2172-40B1-A80E-811CE9D85840}.Release|Any CPU.ActiveCfg = Release|Any CPU - {185EF6D4-2172-40B1-A80E-811CE9D85840}.Release|Any CPU.Build.0 = Release|Any CPU {1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.Build.0 = Debug|Any CPU {1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -426,7 +420,6 @@ Global {CF7645A4-B4C0-4827-B6B0-AE42108071C6} = {57F34E9A-3A98-4E48-BF76-D49CB9CB3323} {3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228} {2539DDF3-0CC5-4A03-B5F9-39B47744A7BD} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02} - {185EF6D4-2172-40B1-A80E-811CE9D85840} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02} {1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02} {FA8C7905-985F-4919-AAA9-4B9A252F4977} = {88725659-D5F8-49F9-9B7E-D87C5B9917D7} {12719498-B87E-4E92-8C2B-30046393CF85} = {BEC3DF4D-9A04-42C8-8B4F-D42750202B4D} diff --git a/build.ps1 b/build.ps1 index 4a99fb376..d51f1a0bb 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 = '80b8f1b4a1cfe57367881e59fca063866dcaaa42' + [string]$BuildBranch = '795fed66b8bae2d248237ee5ec82e688e7174a42' ) $msBuildVersion = 15; @@ -42,21 +42,6 @@ Function Clean-Tests { Remove-Item (Join-Path $PSScriptRoot "Results.*.xml") } -Function Prepare-Vcs-Callback { - [CmdletBinding()] - param() - - Trace-Log 'Preparing Validation.Callback.Vcs Package' - - $ZipPackagePath = "src\Validation.Callback.Vcs\obj\Validation.Callback.Vcs.zip" - - if (Test-Path $ZipPackagePath) { - Remove-Item $ZipPackagePath - } - - Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" "src\Validation.Callback.Vcs\Validation.Callback.Vcs.csproj" -Target "Package" -MSBuildProperties "/P:PackageLocation=obj\Validation.Callback.Vcs.zip" -SkipRestore -} - Function Prepare-NuGetCDNRedirect { [CmdletBinding()] param() @@ -132,13 +117,10 @@ Invoke-BuildStep 'Restoring solution packages' { ` Invoke-BuildStep 'Building solution' { param($Configuration, $BuildNumber, $SolutionPath, $SkipRestore) - Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" $SolutionPath -SkipRestore:$SkipRestore ` + Build-Solution $Configuration $BuildNumber -MSBuildVersion "$msBuildVersion" $SolutionPath -MSBuildProperties "/m" -SkipRestore:$SkipRestore ` } ` -args $Configuration, $BuildNumber, (Join-Path $PSScriptRoot "NuGet.Jobs.sln"), $SkipRestore ` -ev +BuildErrors - -Invoke-BuildStep 'Prepare Validation.Callback.Vcs Package' { Prepare-Vcs-Callback } ` - -ev +BuildErrors Invoke-BuildStep 'Prepare NuGetCDNRedirect Package' { Prepare-NuGetCDNRedirect } ` -ev +BuildErrors @@ -168,8 +150,6 @@ Invoke-BuildStep 'Creating artifacts' { "src/ArchivePackages/ArchivePackages.csproj", ` "src/Search.GenerateAuxiliaryData/Search.GenerateAuxiliaryData.csproj", ` "src/Stats.RollUpDownloadFacts/Stats.RollUpDownloadFacts.csproj", ` - "src/Validation.Callback.Vcs/Validation.Callback.Vcs.csproj", ` - "src/Validation.Callback.Vcs/Validation.Callback.Vcs.WebApp.nuspec", ` "src/Validation.Runner/Validation.Runner.csproj", ` "src/NuGet.SupportRequests.Notifications/NuGet.SupportRequests.Notifications.csproj", ` "src/Validation.Helper/Validation.Helper.csproj", ` diff --git a/sign.thirdparty.targets b/sign.thirdparty.targets new file mode 100644 index 000000000..d8a8d2464 --- /dev/null +++ b/sign.thirdparty.targets @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3PartySHA2 + + + + + \ No newline at end of file diff --git a/src/ArchivePackages/ArchivePackages.csproj b/src/ArchivePackages/ArchivePackages.csproj index 0b4d2e91d..f57109f97 100644 --- a/src/ArchivePackages/ArchivePackages.csproj +++ b/src/ArchivePackages/ArchivePackages.csproj @@ -65,6 +65,11 @@ + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + 1.50.2 @@ -87,7 +92,15 @@ 7.1.2 - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + - + + + + \ No newline at end of file diff --git a/src/CopyAzureContainer/CopyAzureContainer.csproj b/src/CopyAzureContainer/CopyAzureContainer.csproj index e3a564586..a1781bf5c 100644 --- a/src/CopyAzureContainer/CopyAzureContainer.csproj +++ b/src/CopyAzureContainer/CopyAzureContainer.csproj @@ -71,9 +71,29 @@ 7.1.2 + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + + + + + + + \ No newline at end of file diff --git a/src/Gallery.CredentialExpiration/Gallery.CredentialExpiration.csproj b/src/Gallery.CredentialExpiration/Gallery.CredentialExpiration.csproj index 24be2dc28..8da0ba220 100644 --- a/src/Gallery.CredentialExpiration/Gallery.CredentialExpiration.csproj +++ b/src/Gallery.CredentialExpiration/Gallery.CredentialExpiration.csproj @@ -84,6 +84,11 @@ + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + 5.7.0 @@ -106,6 +111,15 @@ 7.1.2 + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + - + + + + \ No newline at end of file diff --git a/src/Gallery.Maintenance/Gallery.Maintenance.csproj b/src/Gallery.Maintenance/Gallery.Maintenance.csproj index 8f1c347cb..02574e4fb 100644 --- a/src/Gallery.Maintenance/Gallery.Maintenance.csproj +++ b/src/Gallery.Maintenance/Gallery.Maintenance.csproj @@ -64,6 +64,11 @@ + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + 1.0.0 @@ -74,6 +79,15 @@ 4.3.3 + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + - + + + + \ No newline at end of file diff --git a/src/LoadTests/LoadTests.csproj b/src/LoadTests/LoadTests.csproj index fd469e5d5..534427c0d 100644 --- a/src/LoadTests/LoadTests.csproj +++ b/src/LoadTests/LoadTests.csproj @@ -82,7 +82,6 @@ - - search|spider|crawl|Bot|Monitor|AlwaysOn - - - - - - - - - - - - - - - - - - - - - - System.Web.Handlers.TransferRequestHandler - Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler - System.Web.StaticFileHandler - System.Web.Handlers.AssemblyResourceLoader - System.Web.Optimization.BundleHandler - System.Web.Script.Services.ScriptHandlerFactory - System.Web.Handlers.TraceHandler - System.Web.Services.Discovery.DiscoveryRequestHandler - System.Web.HttpDebugHandler - - - - - - - diff --git a/src/Validation.Callback.Vcs/Deploy.ps1 b/src/Validation.Callback.Vcs/Deploy.ps1 deleted file mode 100644 index 4c362c0ed..000000000 --- a/src/Validation.Callback.Vcs/Deploy.ps1 +++ /dev/null @@ -1,40 +0,0 @@ -$OctopusAzureModulePath = "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1" -Import-Module $OctopusAzureModulePath -Write-Host "Imported Azure SDK PowerShell Module from $OctopusAzureModulePath" - -Write-Host "Before getting subscriptions, clear folder %appdata%\Windows Azure Powershell\*" -$azureps = $env:APPDATA + '\Windows Azure Powershell\*' -Write-Host "Removing folder: " $azureps -rm $azureps -Write-Host "Removed appdata windows azure powershell folder" - -$AzureCertificateThumbPrint = $OctopusParameters['Deployment.Azure.CertificateThumbprint'] -$AzureSubscriptionName = $OctopusParameters['Deployment.Azure.SubscriptionName'] -$AzureSubscriptionId = $OctopusParameters['Deployment.Azure.SubscriptionId'] -$AzureWebsiteName = $OctopusParameters['Deployment.Azure.WebsiteName'] -$WebPackageName = $OctopusParameters['Deployment.Azure.WebPackageName'] -Write-Host "Web Package Name: " $WebPackageName -$WebPackagePath = $OctopusParameters['Octopus.Action.Package.CustomInstallationDirectory'] + '\' + $WebPackageName -Write-Host "Web Package Path: " $WebPackagePath - -Write-Host "Looking for certificate in CurrentUser" -$cert = dir cert:\CurrentUser -rec | where { $_.Thumbprint -eq $AzureCertificateThumbPrint } | Select -First 1 -if(!$cert) -{ - Write-Host "Not Found in CurrentUser. Looking at LocalMachine" - $cert = dir cert:\LocalMachine -rec | where { $_.Thumbprint -eq $AzureCertificateThumbPrint } | Select -First 1 -} - -if(!$cert) -{ - throw "Certificate is not found in CurrentUser or LocalMachine" -} - -Write-Host "Certificate was found. Setting azure subscription using the certificate..." -Set-AzureSubscription -SubscriptionName '$AzureSubscriptionName' -Certificate $cert -SubscriptionId $AzureSubscriptionId -Write-Host "Azure subscription was set successfully using the certificate obtained. Selecting default azure subscription..." -Select-AzureSubscription -SubscriptionName '$AzureSubscriptionName' -Write-Host "Current SubscriptionName" $AzureSubscriptionName -Write-Host "Selected default azure subscription. Publishing azure website..." -Publish-AzureWebsiteProject -Name $AzureWebsiteName -Package $WebPackagePath -Slot staging -Write-Host "Published azure website successfully." diff --git a/src/Validation.Callback.Vcs/Properties/AssemblyInfo.cs b/src/Validation.Callback.Vcs/Properties/AssemblyInfo.cs deleted file mode 100644 index 2e4265aab..000000000 --- a/src/Validation.Callback.Vcs/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Validation.Callback.Vcs")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Validation.Callback.Vcs")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("185ef6d4-2172-40b1-a80e-811ce9d85840")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.WebApp.nuspec b/src/Validation.Callback.Vcs/Validation.Callback.Vcs.WebApp.nuspec deleted file mode 100644 index f93bca285..000000000 --- a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.WebApp.nuspec +++ /dev/null @@ -1,21 +0,0 @@ - - - - Validation.Callback.Vcs.WebApp.$branch$ - $version$ - Validation.Callback.Vcs.WebApp - .Net Foundation - .Net Foundation - https://github.com/NuGet/NuGet.Jobs/blob/master/LICENSE - https://github.com/NuGet/NuGet.Jobs - false - Validation.Callback.Vcs.WebApp - Copyright 2016 .NET Foundation - nuget job - - - - - - - \ No newline at end of file diff --git a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.csproj b/src/Validation.Callback.Vcs/Validation.Callback.Vcs.csproj deleted file mode 100644 index 52591fb5c..000000000 --- a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.csproj +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - Debug - AnyCPU - - - 2.0 - {185EF6D4-2172-40B1-A80E-811CE9D85840} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - NuGet.Jobs.Validation.Callback.Vcs - Validation.Callback.Vcs - v4.6.2 - true - - - - - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - Designer - - - Web.config - - - Web.config - - - - - Designer - - - - - - - - {2539ddf3-0cc5-4a03-b5f9-39b47744a7bd} - Validation.Common - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - - True - True - 8955 - / - http://localhost:8955/ - False - False - - - False - - - - - \ No newline at end of file diff --git a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.nuspec b/src/Validation.Callback.Vcs/Validation.Callback.Vcs.nuspec deleted file mode 100644 index f7bc6b76f..000000000 --- a/src/Validation.Callback.Vcs/Validation.Callback.Vcs.nuspec +++ /dev/null @@ -1,20 +0,0 @@ - - - - Validation.Callback.Vcs.$branch$ - $version$ - Validation.Callback.Vcs - .Net Foundation - .Net Foundation - https://github.com/NuGet/NuGet.Jobs/blob/master/LICENSE - https://github.com/NuGet/NuGet.Jobs - false - Validation.Callback.Vcs - Copyright 2016 .NET Foundation - nuget job - - - - - - \ No newline at end of file diff --git a/src/Validation.Callback.Vcs/Web.Debug.config b/src/Validation.Callback.Vcs/Web.Debug.config deleted file mode 100644 index 2e302f9f9..000000000 --- a/src/Validation.Callback.Vcs/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/src/Validation.Callback.Vcs/Web.Release.config b/src/Validation.Callback.Vcs/Web.Release.config deleted file mode 100644 index c35844462..000000000 --- a/src/Validation.Callback.Vcs/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/Validation.Callback.Vcs/Web.config b/src/Validation.Callback.Vcs/Web.config deleted file mode 100644 index 2a126ca52..000000000 --- a/src/Validation.Callback.Vcs/Web.config +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Validation.Common.Job/Validation.Common.Job.csproj b/src/Validation.Common.Job/Validation.Common.Job.csproj index 598b6615c..1687e1990 100644 --- a/src/Validation.Common.Job/Validation.Common.Job.csproj +++ b/src/Validation.Common.Job/Validation.Common.Job.csproj @@ -123,6 +123,11 @@ 4.3.3 + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + @@ -135,6 +140,9 @@ ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + \ No newline at end of file diff --git a/src/Validation.Common/Validation.Common.csproj b/src/Validation.Common/Validation.Common.csproj index 09e962b08..cfad84b30 100644 --- a/src/Validation.Common/Validation.Common.csproj +++ b/src/Validation.Common/Validation.Common.csproj @@ -116,12 +116,20 @@ 7.1.2 + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + \ No newline at end of file diff --git a/src/Validation.Helper/Validation.Helper.csproj b/src/Validation.Helper/Validation.Helper.csproj index 4f95e73ff..ac67de677 100644 --- a/src/Validation.Helper/Validation.Helper.csproj +++ b/src/Validation.Helper/Validation.Helper.csproj @@ -73,6 +73,21 @@ Validation.Common + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + \ No newline at end of file diff --git a/src/Validation.PackageSigning.Core/Validation.PackageSigning.Core.csproj b/src/Validation.PackageSigning.Core/Validation.PackageSigning.Core.csproj index e63da9555..1382a4a07 100644 --- a/src/Validation.PackageSigning.Core/Validation.PackageSigning.Core.csproj +++ b/src/Validation.PackageSigning.Core/Validation.PackageSigning.Core.csproj @@ -58,11 +58,21 @@ Validation.Common.Job + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + \ No newline at end of file diff --git a/src/Validation.PackageSigning.ProcessSignature/Scripts/RunE2ETests.ps1 b/src/Validation.PackageSigning.ProcessSignature/Scripts/RunE2ETests.ps1 new file mode 100644 index 000000000..c618c9b49 --- /dev/null +++ b/src/Validation.PackageSigning.ProcessSignature/Scripts/RunE2ETests.ps1 @@ -0,0 +1,47 @@ +$AuthCredentials = "{0}:{1}" -f $OctopusParameters['Vsts.UserName'], $OctopusParameters['Vsts.Password'] +$Base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($AuthCredentials)) +$Headers = @{Authorization = ("Basic {0}" -f $Base64AuthInfo)} + +$QueueParameters = @{} +$QueueParameters.Add('ConfigurationName', $OctopusParameters['Vsts.EndToEnd.Jobs.ConfigurationName']) + +$QueueBody = @{ + definition = @{ + id = $OctopusParameters['Vsts.EndToEnd.BuildDefinitionId'] + }; + parameters = (ConvertTo-Json $QueueParameters) +} + +$QueuedBuild = Invoke-RestMethod ` + -Method Post ` + -ContentType 'application/json' ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds?api-version=2.0" ` + -Headers $Headers ` + -Body (ConvertTo-Json $QueueBody) + +$BuildId = $QueuedBuild.id +Write-Host "Started build $BuildId to run end-to-end tests." + +do { + Start-Sleep -s 20 + + $BuildResponse = Invoke-WebRequest ` + -UseBasicParsing ` + -Method Get ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds/$($BuildId)?api-version=2.0" ` + -Headers $Headers + + $Build = ConvertFrom-Json $BuildResponse + + Write-Host "Test run state:" $Build.status + Write-Host "******************************************" +} until ($Build.status -eq 'completed') + +Write-Host "Test Run Completion Status:" $Build.result +Write-Host "******************************************" +$BuildUri = $Build.uri +Write-Host "For more details checkout:" "https://nuget.visualstudio.com/NuGetBuild/_build/index?buildId=$BuildUri" + +if ($Build.result -ne 'succeeded') { + throw 'Test run failed' +} \ No newline at end of file diff --git a/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.csproj b/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.csproj index 1ae9d197a..7655df56b 100644 --- a/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.csproj +++ b/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.csproj @@ -85,11 +85,25 @@ Validation.PackageSigning.Core + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + + + + + \ No newline at end of file diff --git a/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.nuspec b/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.nuspec index f0d6c4fba..95ba7f9fc 100644 --- a/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.nuspec +++ b/src/Validation.PackageSigning.ProcessSignature/Validation.PackageSigning.ProcessSignature.nuspec @@ -17,6 +17,7 @@ + diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Scripts/RunE2ETests.ps1 b/src/Validation.PackageSigning.RevalidateCertificate/Scripts/RunE2ETests.ps1 new file mode 100644 index 000000000..c618c9b49 --- /dev/null +++ b/src/Validation.PackageSigning.RevalidateCertificate/Scripts/RunE2ETests.ps1 @@ -0,0 +1,47 @@ +$AuthCredentials = "{0}:{1}" -f $OctopusParameters['Vsts.UserName'], $OctopusParameters['Vsts.Password'] +$Base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($AuthCredentials)) +$Headers = @{Authorization = ("Basic {0}" -f $Base64AuthInfo)} + +$QueueParameters = @{} +$QueueParameters.Add('ConfigurationName', $OctopusParameters['Vsts.EndToEnd.Jobs.ConfigurationName']) + +$QueueBody = @{ + definition = @{ + id = $OctopusParameters['Vsts.EndToEnd.BuildDefinitionId'] + }; + parameters = (ConvertTo-Json $QueueParameters) +} + +$QueuedBuild = Invoke-RestMethod ` + -Method Post ` + -ContentType 'application/json' ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds?api-version=2.0" ` + -Headers $Headers ` + -Body (ConvertTo-Json $QueueBody) + +$BuildId = $QueuedBuild.id +Write-Host "Started build $BuildId to run end-to-end tests." + +do { + Start-Sleep -s 20 + + $BuildResponse = Invoke-WebRequest ` + -UseBasicParsing ` + -Method Get ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds/$($BuildId)?api-version=2.0" ` + -Headers $Headers + + $Build = ConvertFrom-Json $BuildResponse + + Write-Host "Test run state:" $Build.status + Write-Host "******************************************" +} until ($Build.status -eq 'completed') + +Write-Host "Test Run Completion Status:" $Build.result +Write-Host "******************************************" +$BuildUri = $Build.uri +Write-Host "For more details checkout:" "https://nuget.visualstudio.com/NuGetBuild/_build/index?buildId=$BuildUri" + +if ($Build.result -ne 'succeeded') { + throw 'Test run failed' +} \ No newline at end of file diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.csproj b/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.csproj index 229a2d6d9..2487646b9 100644 --- a/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.csproj +++ b/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.csproj @@ -83,11 +83,25 @@ Validation.PackageSigning.Core + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + + + + + \ No newline at end of file diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.nuspec b/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.nuspec index b6fc40401..bb39f34f8 100644 --- a/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.nuspec +++ b/src/Validation.PackageSigning.RevalidateCertificate/Validation.PackageSigning.RevalidateCertificate.nuspec @@ -17,6 +17,7 @@ + diff --git a/src/Validation.PackageSigning.ValidateCertificate/Scripts/RunE2ETests.ps1 b/src/Validation.PackageSigning.ValidateCertificate/Scripts/RunE2ETests.ps1 new file mode 100644 index 000000000..c618c9b49 --- /dev/null +++ b/src/Validation.PackageSigning.ValidateCertificate/Scripts/RunE2ETests.ps1 @@ -0,0 +1,47 @@ +$AuthCredentials = "{0}:{1}" -f $OctopusParameters['Vsts.UserName'], $OctopusParameters['Vsts.Password'] +$Base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($AuthCredentials)) +$Headers = @{Authorization = ("Basic {0}" -f $Base64AuthInfo)} + +$QueueParameters = @{} +$QueueParameters.Add('ConfigurationName', $OctopusParameters['Vsts.EndToEnd.Jobs.ConfigurationName']) + +$QueueBody = @{ + definition = @{ + id = $OctopusParameters['Vsts.EndToEnd.BuildDefinitionId'] + }; + parameters = (ConvertTo-Json $QueueParameters) +} + +$QueuedBuild = Invoke-RestMethod ` + -Method Post ` + -ContentType 'application/json' ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds?api-version=2.0" ` + -Headers $Headers ` + -Body (ConvertTo-Json $QueueBody) + +$BuildId = $QueuedBuild.id +Write-Host "Started build $BuildId to run end-to-end tests." + +do { + Start-Sleep -s 20 + + $BuildResponse = Invoke-WebRequest ` + -UseBasicParsing ` + -Method Get ` + -Uri "https://nuget.visualstudio.com/DefaultCollection/NuGetBuild/_apis/build/builds/$($BuildId)?api-version=2.0" ` + -Headers $Headers + + $Build = ConvertFrom-Json $BuildResponse + + Write-Host "Test run state:" $Build.status + Write-Host "******************************************" +} until ($Build.status -eq 'completed') + +Write-Host "Test Run Completion Status:" $Build.result +Write-Host "******************************************" +$BuildUri = $Build.uri +Write-Host "For more details checkout:" "https://nuget.visualstudio.com/NuGetBuild/_build/index?buildId=$BuildUri" + +if ($Build.result -ne 'succeeded') { + throw 'Test run failed' +} \ No newline at end of file diff --git a/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.csproj b/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.csproj index f0633c824..1905054d7 100644 --- a/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.csproj +++ b/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.csproj @@ -86,6 +86,13 @@ Validation.PackageSigning.Core + + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + + @@ -94,6 +101,13 @@ ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + + + + + \ No newline at end of file diff --git a/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.nuspec b/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.nuspec index 673085366..0f6252260 100644 --- a/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.nuspec +++ b/src/Validation.PackageSigning.ValidateCertificate/Validation.PackageSigning.ValidateCertificate.nuspec @@ -17,6 +17,7 @@ + diff --git a/src/Validation.Runner/Validation.Runner.csproj b/src/Validation.Runner/Validation.Runner.csproj index 4f2ef8a72..50c28071e 100644 --- a/src/Validation.Runner/Validation.Runner.csproj +++ b/src/Validation.Runner/Validation.Runner.csproj @@ -76,6 +76,11 @@ + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + 5.7.0 @@ -87,5 +92,14 @@ - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + + \ No newline at end of file diff --git a/src/Validation.ScanAndSign.Core/Validation.ScanAndSign.Core.csproj b/src/Validation.ScanAndSign.Core/Validation.ScanAndSign.Core.csproj index 6f22f9ec2..f05d947c9 100644 --- a/src/Validation.ScanAndSign.Core/Validation.ScanAndSign.Core.csproj +++ b/src/Validation.ScanAndSign.Core/Validation.ScanAndSign.Core.csproj @@ -66,12 +66,20 @@ 2.27.0 + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + \ No newline at end of file diff --git a/src/Validation.Symbols.Core/Validation.Symbols.Core.csproj b/src/Validation.Symbols.Core/Validation.Symbols.Core.csproj index 5dc6080d5..5e2e39d44 100644 --- a/src/Validation.Symbols.Core/Validation.Symbols.Core.csproj +++ b/src/Validation.Symbols.Core/Validation.Symbols.Core.csproj @@ -73,6 +73,11 @@ 2.29.0 + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + @@ -85,6 +90,9 @@ ..\..\build $(BUILD_SOURCESDIRECTORY)\build $(NuGetBuildPath) + none + + \ No newline at end of file diff --git a/src/Validation.Symbols/Validation.Symbols.csproj b/src/Validation.Symbols/Validation.Symbols.csproj index 18afd3936..f5be78935 100644 --- a/src/Validation.Symbols/Validation.Symbols.csproj +++ b/src/Validation.Symbols/Validation.Symbols.csproj @@ -86,6 +86,11 @@ + + 0.3.0 + runtime; build; native; contentfiles; analyzers + all + 1.7.0-preview1-26717-04 @@ -94,4 +99,14 @@ + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + + \ No newline at end of file diff --git a/tests/Tests.Search.GenerateAuxiliaryData/Tests.Search.GenerateAuxiliaryData.csproj b/tests/Tests.Search.GenerateAuxiliaryData/Tests.Search.GenerateAuxiliaryData.csproj index 65c9200c7..d10996431 100644 --- a/tests/Tests.Search.GenerateAuxiliaryData/Tests.Search.GenerateAuxiliaryData.csproj +++ b/tests/Tests.Search.GenerateAuxiliaryData/Tests.Search.GenerateAuxiliaryData.csproj @@ -82,5 +82,13 @@ - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + \ No newline at end of file diff --git a/tests/Tests.Stats.CollectAzureCdnLogs/Tests.Stats.CollectAzureCdnLogs.csproj b/tests/Tests.Stats.CollectAzureCdnLogs/Tests.Stats.CollectAzureCdnLogs.csproj index a31e5808b..271a8e906 100644 --- a/tests/Tests.Stats.CollectAzureCdnLogs/Tests.Stats.CollectAzureCdnLogs.csproj +++ b/tests/Tests.Stats.CollectAzureCdnLogs/Tests.Stats.CollectAzureCdnLogs.csproj @@ -76,5 +76,13 @@ - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + \ No newline at end of file diff --git a/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj b/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj index 4eee5526b..f03d6fbca 100644 --- a/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj +++ b/tests/Tests.Stats.ImportAzureCdnStatistics/Tests.Stats.ImportAzureCdnStatistics.csproj @@ -105,5 +105,13 @@ - + + ..\..\build + $(BUILD_SOURCESDIRECTORY)\build + $(NuGetBuildPath) + none + + + + \ No newline at end of file