Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Prepare Db2AzureSearch for Ev2 deployment #528

Merged
merged 1 commit into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<None Include="Scripts\Functions.ps1" />
<None Include="Scripts\PostDeploy.ps1" />
<None Include="Scripts\PreDeploy.ps1" />
<None Include="Settings\octopus.json" />
<None Include="Scripts\nssm.exe" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>NuGet.Jobs.Catalog2AzureSearch</id>
<id>Catalog2AzureSearch</id>
<version>$version$</version>
<authors>.NET Foundation</authors>
<owners>.NET Foundation</owners>
<description>NuGet.Jobs.Catalog2AzureSearch</description>
<description>Catalog2AzureSearch</description>
<copyright>Copyright .NET Foundation</copyright>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions src/NuGet.Jobs.Catalog2AzureSearch/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace NuGet.Jobs
{
public class Program
{
public static void Main(string[] args)
public static int Main(string[] args)
{
var job = new Job();
JobRunner.Run(job, args).GetAwaiter().GetResult();
return JobRunner.Run(job, args).GetAwaiter().GetResult();
}
}
}
28 changes: 0 additions & 28 deletions src/NuGet.Jobs.Catalog2AzureSearch/Settings/octopus.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<None Include="App.config" />
<None Include="NuGet.Jobs.Db2AzureSearch.nuspec" />
<None Include="Scripts\PostDeploy.ps1" />
<None Include="Settings\octopus.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>NuGet.Jobs.Db2AzureSearch</id>
<id>Db2AzureSearch</id>
<version>$version$</version>
<authors>.NET Foundation</authors>
<owners>.NET Foundation</owners>
<description>NuGet.Jobs.Db2AzureSearch</description>
<description>Db2AzureSearch</description>
<copyright>Copyright .NET Foundation</copyright>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions src/NuGet.Jobs.Db2AzureSearch/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ namespace NuGet.Jobs
{
public class Program
{
public static void Main(string[] args)
public static int Main(string[] args)
{
var job = new Job();
JobRunner.RunOnce(job, args).GetAwaiter().GetResult();
return JobRunner.RunOnce(job, args).GetAwaiter().GetResult();
}
}
}
8 changes: 5 additions & 3 deletions src/NuGet.Jobs.Db2AzureSearch/Scripts/PostDeploy.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Start-Process `
.\bin\NuGet.Jobs.Db2AzureSearch.exe `
-ArgumentList "-Configuration `"bin\octopus.json`" -InstrumentationKey `"#{ApplicationInsightsInstrumentationKey}`" -Verbose true"
.\RunJob.cmd

if ($LastExitCode -ne 0) {
throw "The job failed with exit code $LastExitCode"
}
28 changes: 0 additions & 28 deletions src/NuGet.Jobs.Db2AzureSearch/Settings/octopus.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>NuGet.Jobs.Owners2AzureSearch</id>
<id>Owners2AzureSearch</id>
<version>$version$</version>
<authors>.NET Foundation</authors>
<owners>.NET Foundation</owners>
<description>NuGet.Jobs.Owners2AzureSearch</description>
<description>Owners2AzureSearch</description>
<copyright>Copyright .NET Foundation</copyright>
</metadata>
<files>
Expand Down
12 changes: 10 additions & 2 deletions src/NuGet.Jobs.Owners2AzureSearch/Program.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
// 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.Threading;

namespace NuGet.Jobs
{
public class Program
{
public static void Main(string[] args)
public static int Main(string[] args)
{
var job = new Job();
JobRunner.Run(job, args).GetAwaiter().GetResult();
var exitCode = JobRunner.Run(job, args).GetAwaiter().GetResult();

// Sleep to allow Application Insights to flush all logs. See issue:
// https://github.com/Microsoft/ApplicationInsights-dotnet/issues/407
Thread.Sleep(30000);

return exitCode;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
<Version>5.0.3</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Validation.Common.Job">
<Version>4.1.0-dev-2576357</Version>
<Version>4.1.0-dev-2701693</Version>
</PackageReference>
<PackageReference Include="NuGet.Build.Tasks.Pack">
<Version>4.8.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
Expand Down Expand Up @@ -158,9 +157,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NuGet.Protocol">
<Version>4.8.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Services.Storage">
<Version>2.25.0-sb-queuesize-32353</Version>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task DoesNotInitializeAgainWhenAlreadyInitialized()
{
// Arrange
await _target.EnsureInitializedAsync();
_client.ResetCalls();
_client.Invocations.Clear();

// Act
await _target.EnsureInitializedAsync();
Expand Down Expand Up @@ -117,7 +117,7 @@ public async Task InitializesAgainWhenAlreadyInitialized()
{
// Arrange
await _target.TryLoadAsync(_token);
_client.ResetCalls();
_client.Invocations.Clear();

// Act
await _target.TryLoadAsync(_token);
Expand Down