Skip to content
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
9 changes: 2 additions & 7 deletions .github/workflows/createrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ jobs:

steps:
- uses: actions/checkout@v2.3.4

- name: Install NET 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'


- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
Expand Down Expand Up @@ -53,7 +48,7 @@ jobs:

- name: Publish API
if: ${{ github.event.release.prerelease == false }}
run: dotnet publish "MessagingService\MessagingService.csproj" --configuration Release --output publishOutput
run: dotnet publish "MessagingService\MessagingService.csproj" --configuration Release --output publishOutput -r win-x64 --self-contained

- name: Install Octopus CLI
if: ${{ github.event.release.prerelease == false }}
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/nightlybuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ jobs:

steps:
- uses: actions/checkout@v2.3.4

- name: Install NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.101'

- name: Set Up Variables
run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4

- name: Install NET 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'

- name: Restore Nuget Packages
run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json

Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/pushtomaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ jobs:
with:
fetch-depth: 0

- name: Install NET 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'

- name: Restore Nuget Packages
run: dotnet restore MessagingService.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json

Expand Down
2 changes: 2 additions & 0 deletions MessagingService/MessagingService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
<PackageReference Include="Shared" Version="2023.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
Expand All @@ -27,6 +28,7 @@
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.4.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 5 additions & 4 deletions MessagingService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ public static void Main(string[] args)

public static IHostBuilder CreateHostBuilder(string[] args)
{
Console.Title = "Messaging Service";

//At this stage, we only need our hosting file for ip and ports
IConfigurationRoot config = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("hosting.json", optional: true)
FileInfo fi = new FileInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);

IConfigurationRoot config = new ConfigurationBuilder().SetBasePath(fi.Directory.FullName)
.AddJsonFile("hosting.json", optional: false)
.AddJsonFile("hosting.development.json", optional: true)
.AddEnvironmentVariables().Build();

IHostBuilder hostBuilder = Host.CreateDefaultBuilder(args);
hostBuilder.UseWindowsService();
hostBuilder.UseLamar();
hostBuilder.ConfigureLogging(logging =>
{
Expand Down