Skip to content

Commit

Permalink
GitHubSync update - master (#725)
Browse files Browse the repository at this point in the history
* GitHubSync update - master

* Update TFMs

* Update testing packages

* Update packages

* Update packages

* Update packages to prevent transitive CVE

* Update workflows

* Add workaround to avoid NETSDK1206 warning

* Update hardcoded path

---------

Co-authored-by: internalautomation[bot] <85681268+internalautomation[bot]@users.noreply.github.com>
Co-authored-by: Brandon Ording <[email protected]>
  • Loading branch information
internalautomation[bot] and bording authored Nov 21, 2024
1 parent a760538 commit 11cede6
Show file tree
Hide file tree
Showing 53 changed files with 339 additions and 260 deletions.
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
version: 2
registries:
particular-packages:
type: nuget-feed
url: https://f.feedz.io/particular-software/packages/nuget/index.json
updates:
- package-ecosystem: nuget
directory: "/src"
registries: "*"
schedule:
interval: daily
open-pull-requests-limit: 1000
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: |
7.0.x
6.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Upload packages
Expand Down
33 changes: 10 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,32 @@ env:
DOTNET_NOLOGO: true
jobs:
release:
runs-on: windows-2019 # Code signing requirement https://github.com/NuGet/Home/issues/7939
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Parse repo name
run: |
$FullName = "$env:GITHUB_REPOSITORY"
$Org,$RepoName = $FullName.Split('/')
echo "PARTICULAR_REPO_NAME=$RepoName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Install NuGetKeyVaultSignTool
run: dotnet tool install --global NuGetKeyVaultSignTool
- name: Sign NuGet Packages
run: |
NuGetKeyVaultSignTool sign nugets\*.nupkg `
--file-digest sha256 `
--timestamp-rfc3161 http://timestamp.digicert.com `
--timestamp-digest sha256 `
--azure-key-vault-url https://particularcodesigning.vault.azure.net `
--azure-key-vault-client-id ${{ secrets.AZURE_KEY_VAULT_CLIENT_ID }} `
--azure-key-vault-tenant-id ${{ secrets.AZURE_KEY_VAULT_TENANT_ID }} `
--azure-key-vault-client-secret ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }} `
--azure-key-vault-certificate ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }}
shell: pwsh
- name: Sign NuGet packages
uses: Particular/[email protected]
with:
client-id: ${{ secrets.AZURE_KEY_VAULT_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_KEY_VAULT_TENANT_ID }}
client-secret: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }}
certificate-name: ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }}
- name: Publish artifacts
uses: actions/[email protected]
with:
name: nugets
path: nugets/*
retention-days: 1
- name: Deploy
uses: Particular/push-octopus-package-action@v2.1.0
uses: Particular/push-octopus-package-action@main
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
5 changes: 5 additions & 0 deletions src/Custom.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@
<MinVerAutoIncrement>minor</MinVerAutoIncrement>
</PropertyGroup>

<!-- Workaround to avoid NETSDK1206 warning from deprecated Cosmos packages -->
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel Condition="'$(AnalysisLevel)' == ''">5.0</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- NuGetAuditMode set to 'all' for tool projects in Directory.Build.targets, other project types default to 'direct' -->
<NuGetAuditLevel>low</NuGetAuditLevel>
<NuGetAuditMode Condition="'$(NuGetAuditMode)' == ''">all</NuGetAuditMode>
<!-- To lock the version of Particular.Analyzers, for example, in a release branch, set this property in Custom.Build.props -->
<ParticularAnalyzersVersion Condition="'$(ParticularAnalyzersVersion)' == ''">2.1.2</ParticularAnalyzersVersion>
<ParticularAnalyzersVersion Condition="'$(ParticularAnalyzersVersion)' == ''">2.1.3</ParticularAnalyzersVersion>
<NServiceBusKey>0024000004800000940000000602000000240000525341310004000001000100dde965e6172e019ac82c2639ffe494dd2e7dd16347c34762a05732b492e110f2e4e2e1b5ef2d85c848ccfb671ee20a47c8d1376276708dc30a90ff1121b647ba3b7259a6bc383b2034938ef0e275b58b920375ac605076178123693c6c4f1331661a62eba28c249386855637780e3ff5f23a6d854700eaa6803ef48907513b92</NServiceBusKey>
<NServiceBusTestsKey>00240000048000009400000006020000002400005253413100040000010001007f16e21368ff041183fab592d9e8ed37e7be355e93323147a1d29983d6e591b04282e4da0c9e18bd901e112c0033925eb7d7872c2f1706655891c5c9d57297994f707d16ee9a8f40d978f064ee1ffc73c0db3f4712691b23bf596f75130f4ec978cf78757ec034625a5f27e6bb50c618931ea49f6f628fd74271c32959efb1c5</NServiceBusTestsKey>
</PropertyGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project>

<PropertyGroup>
<NuGetAuditMode Condition="'$(PackAsTool)' == 'true'">all</NuGetAuditMode>
</PropertyGroup>
<Import Project="msbuild\AutomaticVersionRanges.targets" Condition="Exists('msbuild\AutomaticVersionRanges.targets')" />

</Project>
6 changes: 3 additions & 3 deletions src/TestHelper/EnvironmentVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public static class EnvironmentVariables

public const string SqlServerConnectionString = "SqlServerConnectionString";

public static IReadOnlyList<string> Names { get; } = new List<string>
{
public static IReadOnlyList<string> Names { get; } =
[
AzureStorageConnectionString,
Raven4Url,
OracleConnectionString,
RabbitMqHost,
Raven3Url,
SqlServerConnectionString,
};
];
}
9 changes: 5 additions & 4 deletions src/TestHelper/TestHelper.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net48;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net48;net8.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit.Analyzers" Version="4.4.0" />
</ItemGroup>

<!-- Workaround to prevent VS test discovery error -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.8.6" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="2.4.0" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.5" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.6" />
</ItemGroup>

<ItemGroup Label="Direct references to transitive dependencies to avoid versions with CVE">
<PackageReference Include="System.Drawing.Common" Version="4.7.3" />
</ItemGroup>

</Project>
38 changes: 19 additions & 19 deletions src/TimeoutMigrationTool.ASQ.IntegrationTests/ASQTargetTests.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace TimeoutMigrationTool.ASQ.IntegrationTests
{
using Microsoft.Azure.Cosmos.Table;
using NUnit.Framework;
using Particular.TimeoutMigrationTool;
using Particular.TimeoutMigrationTool.ASQ;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Table;
using NUnit.Framework;
using Particular.TimeoutMigrationTool;
using Particular.TimeoutMigrationTool.ASQ;

[TestFixture]
[EnvironmentSpecificTest(EnvironmentVariables.AzureStorageConnectionString)]
Expand Down Expand Up @@ -113,8 +113,8 @@ public async Task StageBatch_inserts_timeouts_into_the_staging_queue()
await using var migrator = await timeoutTarget.PrepareTargetEndpointBatchMigrator(endpointName);

// Act
var numberStaged = await migrator.StageBatch(new List<TimeoutData>
{
var numberStaged = await migrator.StageBatch(
[
new TimeoutData
{
Id = "SomeID",
Expand All @@ -137,7 +137,7 @@ public async Task StageBatch_inserts_timeouts_into_the_staging_queue()
State = new byte[2],
Time = new DateTime(2021, 12, 12, 12, 13, 13, DateTimeKind.Utc)
},
}, 1);
], 1);

// Assert
var recordsInTable = await ReadTimeoutsFromTable(nameProvider.GetStagingTableName(endpointName));
Expand All @@ -160,8 +160,8 @@ public async Task CompleteBatch_Moves_All_Entries_From_Staging_To_DelayedMessage
var timeoutTarget = new ASQTarget(connectionString, nameProvider);
await using var migrator = await timeoutTarget.PrepareTargetEndpointBatchMigrator(endpointName);

await migrator.StageBatch(new List<TimeoutData>
{
await migrator.StageBatch(
[
new TimeoutData
{
Id = "SomeID",
Expand All @@ -184,7 +184,7 @@ await migrator.StageBatch(new List<TimeoutData>
State = new byte[2],
Time = new DateTime(2021, 12, 12, 12, 13, 13, DateTimeKind.Utc)
},
}, 1);
], 1);

// Act
var numberCompleted = await migrator.CompleteBatch(1);
Expand All @@ -210,8 +210,8 @@ public async Task CompleteBatch_Removes_All_Entries_From_Staging()
var timeoutTarget = new ASQTarget(connectionString, nameProvider);
await using var migrator = await timeoutTarget.PrepareTargetEndpointBatchMigrator(endpointName);

await migrator.StageBatch(new List<TimeoutData>
{
await migrator.StageBatch(
[
new TimeoutData
{
Id = "SomeID",
Expand All @@ -234,7 +234,7 @@ await migrator.StageBatch(new List<TimeoutData>
State = new byte[2],
Time = new DateTime(2021, 12, 12, 12, 13, 13, DateTimeKind.Utc)
},
}, 1);
], 1);

// Act
await migrator.CompleteBatch(1);
Expand Down Expand Up @@ -276,8 +276,8 @@ public async Task Complete_Throws_If_Messages_Are_Still_Staged()
var timeoutTarget = new ASQTarget(connectionString, nameProvider);
await using var migrator = await timeoutTarget.PrepareTargetEndpointBatchMigrator(endpointName);

var numberStaged = await migrator.StageBatch(new List<TimeoutData>
{
var numberStaged = await migrator.StageBatch(
[
new TimeoutData
{
Id = "SomeID",
Expand All @@ -300,7 +300,7 @@ public async Task Complete_Throws_If_Messages_Are_Still_Staged()
State = new byte[2],
Time = new DateTime(2021, 12, 12, 12, 13, 13, DateTimeKind.Utc)
},
}, 1);
], 1);

// Assert
Assert.ThrowsAsync<Exception>(async () =>
Expand All @@ -321,8 +321,8 @@ public async Task Complete_Removes_Staging_Queue_If_Empty()
var timeoutTarget = new ASQTarget(connectionString, nameProvider);
await using var migrator = await timeoutTarget.PrepareTargetEndpointBatchMigrator(endpointName);

await migrator.StageBatch(new List<TimeoutData>
{
await migrator.StageBatch(
[
new TimeoutData
{
Id = "SomeID",
Expand All @@ -345,7 +345,7 @@ await migrator.StageBatch(new List<TimeoutData>
State = new byte[2],
Time = new DateTime(2021, 12, 12, 12, 13, 13, DateTimeKind.Utc)
},
}, 1);
], 1);

await migrator.CompleteBatch(1);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,9 +11,7 @@

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<!-- Suppress NU1608 warning for NServiceBus.AcceptanceTesting, newer versions reference NUnit4 but
we can't update because the tool doesn't support newer versions of NServiceBus
as the tool is aimed at upgrading from NSB 7 to 8 -->
<NoWarn>$(NoWarn);NU1608</NoWarn>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,21 +11,23 @@

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="7.8.4" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="7.8.6" />
<PackageReference Include="NServiceBus.Persistence.AzureStorage" Version="2.4.2" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="7.0.5" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.5" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="7.0.7" />
<PackageReference Include="NServiceBus.Transport.AzureStorageQueues" Version="10.0.6" />
<PackageReference Include="NServiceBus.Newtonsoft.Json" Version="2.4.0" />
<PackageReference Include="NServiceBus.SqlServer" Version="6.3.8" />
</ItemGroup>

<ItemGroup Label="Direct references to transitive dependencies to avoid versions with CVE">
<PackageReference Include="System.Drawing.Common" Version="4.7.3" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\TimeoutMigrationTool.SqlP.AcceptanceTests\MsSqlMicrosoftDataClientHelper.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.23.0" />
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="1.0.8" />
</ItemGroup>

<ItemGroup Label="Direct references to transitive dependencies to avoid versions with CVE">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,9 +11,7 @@

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

Expand Down
Loading

0 comments on commit 11cede6

Please sign in to comment.