Skip to content

Commit ebe2f84

Browse files
committed
v3.0.0 release
1 parent 417cc32 commit ebe2f84

File tree

132 files changed

+1680
-1138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1680
-1138
lines changed

.azuredevops/pipelines/publish.yml

Lines changed: 99 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
1-
pool:
2-
vmImage: 'windows-latest'
31

42
parameters:
3+
- name: PublishPackage
4+
displayName: 'Confirm Publish Package to nuget'
5+
type: boolean
6+
default: false
57
- name: pushEnvironment
6-
displayName: 'Push to which environment?'
8+
displayName: 'Nuget Environment'
79
type: string
810
values:
9-
- Test
10-
- Production
11-
default: Test
11+
- dev
12+
- prod
13+
default: dev
1214

13-
# The build configuration is defined, in this case we are building Release packages
14-
# Based on 'pushEnvironment' parameter, we set other variables and variable groups to use test vs prod settings
15-
variables:
16-
- name: buildConfiguration
17-
value: 'Release'
18-
- name : apiKey
19-
${{ if eq(parameters.pushEnvironment, 'Production') }}:
20-
value: $(nuget-mock-solution-test-automation-api-key)
21-
${{ if ne(parameters.pushEnvironment, 'Production') }}:
22-
value: $(int-nugettest-mock-solution-test-automation-api-key)
23-
- name : nugetOrgSource
24-
${{ if eq(parameters.pushEnvironment, 'Production') }}:
25-
value: 'https://api.nuget.org/v3/index.json'
26-
${{ if ne(parameters.pushEnvironment, 'Production') }}:
27-
value: 'https://apiint.nugettest.org/v3/index.json'
28-
- ${{ if eq(parameters.pushEnvironment, 'Production') }}:
29-
- group: nuget_package_deployment
30-
- ${{ if ne(parameters.pushEnvironment, 'Production') }}:
31-
- group: int_nugettest_package_deployment
3215

3316
# The github-ref-prefix should be either 'tags/' (for a tagged release) or 'heads/' (for a branch). Release number is either the tag name or branch name
3417
# The standard release process would use a tagged release where the tag name is the version number (e.g 1.0.0) so prefix is default 'tags/' and release-number would be '1.0.0'
@@ -40,72 +23,100 @@ resources:
4023
endpoint: github.com_CDR-CI
4124
ref: refs/$(github-ref-prefix)$(release-number)
4225

43-
# The build has 3 seperate tasks run under 1 step
44-
steps:
45-
- checkout: GitHubRepo
46-
fetchDepth: 0
4726

48-
# Build the project by running the dotnet command build, pointing to our csproj file
49-
- task: DotNetCoreCLI@2
50-
displayName: 'dotnet build'
51-
inputs:
52-
command: 'build'
53-
versioningScheme: byBuildNumber
54-
arguments: '--configuration $(buildConfiguration) /p:UsingGitHubSource=true'
55-
projects: '$(System.DefaultWorkingDirectory)\Source\**\*.csproj'
27+
stages:
28+
- stage: ${{parameters.pushEnvironment}}
29+
variables:
30+
- group: nuget_package_deployment_${{parameters.pushEnvironment}}
31+
- group: nuget_package_deployment_certificate
32+
- name: buildConfiguration
33+
value: 'Release'
34+
- name : nuget-server-url
35+
${{ if eq(parameters.pushEnvironment, 'prod') }}:
36+
value: 'https://api.nuget.org/v3/index.json'
37+
${{ else }}:
38+
value: 'https://apiint.nugettest.org/v3/index.json'
39+
5640

57-
# Create the package by running the dotnet pack command again pointing to the csproj file
58-
# The nobuild means the project will not be compiled before running pack, because its already built in above step
59-
- task: DotNetCoreCLI@2
60-
displayName: "dotnet pack"
61-
inputs:
62-
command: 'pack'
63-
configuration: $(BuildConfiguration)
64-
packagesToPack: '$(System.DefaultWorkingDirectory)\Source\**\*.csproj'
65-
nobuild: true
66-
versioningScheme: 'off'
67-
68-
- task: PublishSymbols@2
69-
displayName: Publish symbols path
70-
continueOnError: True
71-
inputs:
72-
SearchPattern: '**\bin\**\*.pdb'
73-
PublishSymbols: false
74-
SymbolServerType: TeamServices
41+
pool:
42+
vmImage: 'windows-latest'
43+
jobs:
44+
- job : deploy_${{parameters.pushEnvironment}}
45+
46+
# The build has 3 seperate tasks run under 1 step
47+
steps:
48+
- checkout: GitHubRepo
49+
fetchDepth: 0
7550

76-
- task: DotNetCoreCLI@2
77-
displayName: Install NuGetKeyVaultSignTool
78-
inputs:
79-
command: 'custom'
80-
custom: 'tool'
81-
arguments: 'install --tool-path . NuGetKeyVaultSignTool'
51+
# Build the project by running the dotnet command build, pointing to our csproj file
52+
- task: DotNetCoreCLI@2
53+
displayName: 'dotnet build'
54+
inputs:
55+
command: 'build'
56+
versioningScheme: byBuildNumber
57+
arguments: '--configuration $(buildConfiguration) /p:UsingGitHubSource=true'
58+
projects: '$(System.DefaultWorkingDirectory)\Source\**\*.csproj'
59+
60+
# Create the package by running the dotnet pack command again pointing to the csproj file
61+
# The nobuild means the project will not be compiled before running pack, because its already built in above step
62+
- task: DotNetCoreCLI@2
63+
displayName: "dotnet pack"
64+
inputs:
65+
command: 'pack'
66+
configuration: $(BuildConfiguration)
67+
packagesToPack: '$(System.DefaultWorkingDirectory)\Source\**\*.csproj'
68+
nobuild: true
69+
versioningScheme: 'off'
70+
71+
- task: PublishSymbols@2
72+
displayName: Publish symbols path
73+
continueOnError: True
74+
inputs:
75+
SearchPattern: '**\bin\**\*.pdb'
76+
PublishSymbols: false
77+
SymbolServerType: TeamServices
78+
79+
- task: DotNetCoreCLI@2
80+
displayName: Install NuGetKeyVaultSignTool
81+
inputs:
82+
command: 'custom'
83+
custom: 'tool'
84+
arguments: 'install --tool-path . NuGetKeyVaultSignTool'
8285

83-
# WARNING: This will not throw an error if it can't find the file and will close silently (false positive)
84-
- task: PowerShell@2
85-
displayName: Signing with NuGetKeyVaultSignTool
86-
inputs:
87-
targetType: 'inline'
88-
script: |
89-
.\NuGetKeyVaultSignTool sign $(Build.ArtifactStagingDirectory)\*.nupkg `
90-
--file-digest "sha256" `
91-
--timestamp-rfc3161 "http://timestamp.digicert.com" `
92-
--timestamp-digest "sha256" `
93-
--azure-key-vault-url $(code-signing-kv-url) `
94-
--azure-key-vault-tenant-id $(code-signing-kv-tenant-id) `
95-
--azure-key-vault-client-id $(sp-code-signing-prod-client-id) `
96-
--azure-key-vault-client-secret $(sp-code-signing-prod-client-secret) `
97-
--azure-key-vault-certificate $(code-signing-cert-name)
86+
# WARNING: This will not throw an error if it can't find the file and will close silently (false positive)
87+
- task: PowerShell@2
88+
displayName: Signing with NuGetKeyVaultSignTool
89+
inputs:
90+
targetType: 'inline'
91+
script: |
92+
.\NuGetKeyVaultSignTool sign $(Build.ArtifactStagingDirectory)\*.nupkg `
93+
--file-digest "sha256" `
94+
--timestamp-rfc3161 "http://timestamp.digicert.com" `
95+
--timestamp-digest "sha256" `
96+
--azure-key-vault-url $(code-signing-kv-url) `
97+
--azure-key-vault-tenant-id $(code-signing-kv-tenant-id) `
98+
--azure-key-vault-client-id $(sp-code-signing-prod-client-id) `
99+
--azure-key-vault-client-secret $(sp-code-signing-prod-client-secret) `
100+
--azure-key-vault-certificate $(code-signing-cert-name)
101+
102+
# NOTE: Avoiding verifying with NuGetKeyVaultSignTool as it is rather faulty. Will give false positive for a file that doesn't exist.
103+
# Use dotnet nuget verify instead
104+
- task: PowerShell@2
105+
displayName: Verifying NuGetKeyVaultSign
106+
inputs:
107+
targetType: 'inline'
108+
script: 'dotnet nuget verify $(Build.ArtifactStagingDirectory)\*.nupkg'
98109

99-
# NOTE: Avoiding verifying with NuGetKeyVaultSignTool as it is rather faulty. Will give false positive for a file that doesn't exist.
100-
# Use dotnet nuget verify instead
101-
- task: PowerShell@2
102-
displayName: Verifying NuGetKeyVaultSign
103-
inputs:
104-
targetType: 'inline'
105-
script: 'dotnet nuget verify $(Build.ArtifactStagingDirectory)\*.nupkg'
110+
- task: PowerShell@2
111+
displayName: 'Publishing to $(nuget-server-url)'
112+
condition: and(succeeded(), eq(${{parameters.PublishPackage}} , true))
113+
inputs:
114+
targetType: 'inline'
115+
script: 'dotnet nuget push $(Build.ArtifactStagingDirectory)\*.nupkg --api-key $(nuget-server-api-key) -n --source $(nuget-server-url)'
106116

107-
- task: PowerShell@2
108-
displayName: Publishing signed package
109-
inputs:
110-
targetType: 'inline'
111-
script: 'dotnet nuget push $(Build.ArtifactStagingDirectory)\*.nupkg --api-key $(apiKey) -n --source $(nugetOrgSource)'
117+
- task: PublishPipelineArtifact@1
118+
displayName: Publish Signed Package
119+
condition: succeeded()
120+
inputs:
121+
path: $(Build.ArtifactStagingDirectory)
122+
artifact: mock-test-automation-solution

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [3.0.0] - 2025-03-19
10+
### Changed
11+
- Fixed multiple build warnings to improve code quality and maintainability.
12+
13+
### Removed
14+
- Removed all OIDC Hybrid Flow related code and functionality.
15+
916
## [2.0.0] - 2024-08-06
1017
### Changed
1118
- Updated nuget package versions.

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Visit our [Responsible disclosure of security vulnerabilities policy](https://ww
1111

1212
| Version | Supported |
1313
| ------- | ------------------ |
14-
| 2.0.x | :white_check_mark: |
14+
| 3.0.x | :white_check_mark: |
15+
| 2.x.x | :x: |
1516
| 1.x.x | :x: |
1617

1718

Source/.editorconfig

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,123 @@ tab_width = 4
256256
indent_size = 4
257257
end_of_line = crlf
258258
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
259+
260+
[*.cs]
261+
# complete the task associated to this 'TODO'
262+
dotnet_diagnostic.S1135.severity = none
263+
264+
# documentation missing for a parameter
265+
dotnet_diagnostic.SA1611.severity = none
266+
267+
# Filename should match first type name
268+
dotnet_diagnostic.SA1649.severity = none
269+
270+
# element parameter should have text
271+
dotnet_diagnostic.SA1614.severity = none
272+
273+
# enumeration elements should be documented
274+
dotnet_diagnostic.SA1602.severity = none
275+
276+
# partial elements should be documented
277+
dotnet_diagnostic.SA1601.severity = none
278+
279+
# elements should be documented
280+
dotnet_diagnostic.SA1600.severity = none
281+
282+
# file may only contain a single type
283+
dotnet_diagnostic.SA1402.severity = none
284+
285+
# The public modifier should appear before static
286+
dotnet_diagnostic.SA1206.severity = none
287+
288+
# static members should appear before non-static members
289+
dotnet_diagnostic.SA1204.severity = none
290+
291+
# public members should come before private
292+
dotnet_diagnostic.SA1202.severity = none
293+
294+
# a filed should not follow a property
295+
dotnet_diagnostic.SA1201.severity = none
296+
297+
# code should not contain blank lines at end
298+
dotnet_diagnostic.SA1518.severity = none
299+
300+
# closing brace should be followed by blank line
301+
dotnet_diagnostic.SA1513.severity = none
302+
303+
# element should not be on a single line
304+
dotnet_diagnostic.SA1502.severity = none
305+
306+
# use trailing comma in multi-line intializers
307+
dotnet_diagnostic.SA1413.severity = none
308+
309+
# variable should begin with lower case letter
310+
dotnet_diagnostic.SA1312.severity = none
311+
312+
# field should be private
313+
dotnet_diagnostic.SA1401.severity = none
314+
315+
# element should declare access modifier
316+
dotnet_diagnostic.SA1400.severity = none
317+
318+
# parameter should being with lower-case
319+
dotnet_diagnostic.SA1313.severity = none
320+
321+
# field should begin with upper case
322+
dotnet_diagnostic.SA1307.severity = none
323+
324+
# readonly fields should appear before non-readonly
325+
dotnet_diagnostic.SA1214.severity = none
326+
327+
# constant fields should appear before non-constant fields
328+
dotnet_diagnostic.SA1203.severity = none
329+
330+
# do not use regions
331+
dotnet_diagnostic.SA1124.severity = none
332+
333+
# generic type constraints should be on their own line
334+
dotnet_diagnostic.SA1127.severity = none
335+
336+
# use built-in type alias
337+
dotnet_diagnostic.SA1121.severity = none
338+
339+
# parameters should all be placed on the same line
340+
dotnet_diagnostic.SA1117.severity = none
341+
342+
# parameter spans multiple lines
343+
dotnet_diagnostic.SA1118.severity = none
344+
345+
# parameter should begin on the line after the previous parameter
346+
dotnet_diagnostic.SA1115.severity = none
347+
348+
# code should not contain trailing whitespace
349+
dotnet_diagnostic.SA1028.severity = none
350+
351+
# closing square bracket should be followed by a space
352+
dotnet_diagnostic.SA1011.severity = none
353+
354+
# keyword new should be followed by a space
355+
dotnet_diagnostic.SA1000.severity = none
356+
357+
# opening square brackets should not be preceded by a space
358+
dotnet_diagnostic.SA1010.severity = none
359+
360+
[DataRecipientConsentCallback*.cs]
361+
# remove the unused private method
362+
dotnet_diagnostic.S1144.severity = none
363+
364+
[JwksEndpoint.cs]
365+
# remove the unused private method
366+
dotnet_diagnostic.S1144.severity = none
367+
368+
[Test*.cs]
369+
# Missing xml comment for publicly visible type
370+
dotnet_diagnostic.CS1591.severity = none
371+
372+
[RegisterSSAService.cs]
373+
# remove this useless conditional
374+
dotnet_diagnostic.S3440.severity = none
375+
376+
[DateTimeExtensions.cs]
377+
# use string.Empty for empty strings
378+
dotnet_diagnostic.SA1122.severity = none

Source/ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation.UnitTests/ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation.UnitTests.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<Nullable>enable</Nullable>
66
<IsPackable>false</IsPackable>
77
<IsTestProject>true</IsTestProject>
8+
<GenerateDocumentationFile>True</GenerateDocumentationFile>
89
</PropertyGroup>
910
<ItemGroup>
1011
<Compile Remove="TestResults\**" />
@@ -17,6 +18,14 @@
1718
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1819
</PackageReference>
1920
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
21+
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.5.0.109200">
22+
<PrivateAssets>all</PrivateAssets>
23+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24+
</PackageReference>
25+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
26+
<PrivateAssets>all</PrivateAssets>
27+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28+
</PackageReference>
2029
<PackageReference Include="xunit" Version="2.9.0" />
2130
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2231
<PrivateAssets>all</PrivateAssets>

Source/ConsumerDataRight.ParticipantTooling.MockSolution.TestAutomation.UnitTests/Tests/TestClass1.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ public class TestClass1
99
{
1010
public class Startup
1111
{
12-
//A default startup is required due to the test project inheriting Xunit.DependencyInjection from the Nuget project.
13-
public void ConfigureServices(IServiceCollection services) { }
12+
// A default startup is required due to the test project inheriting Xunit.DependencyInjection from the Nuget project.
13+
public void ConfigureServices(IServiceCollection services)
14+
{
15+
// Method intentionally left empty.
16+
}
1417
}
1518

1619
[Fact]

0 commit comments

Comments
 (0)