-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from FirelyTeam/feature/strong-name-signging
Strong name signing and other maintenance
- Loading branch information
Showing
14 changed files
with
510 additions
and
350 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Repo: FirelyTeam/azure-pipeline-templates | ||
# File: build.yml | ||
|
||
parameters: | ||
# Default values | ||
dotNetCoreVersion: '3.1.102' # can also be use with wildcards: latest minor version of 3. , use '3.x' | ||
useVersionSuffix: true | ||
restoreDependencies: false | ||
nuGetServiceConnections: #required when restoreDependies = true | ||
nuGetSources: #required when restoreDependies = true | ||
packageArtifacts: false | ||
publishArtifacts: false | ||
publishWebProjects: false | ||
zipAfterPublish: false | ||
checkoutSubmodules: false | ||
pool: {} | ||
|
||
jobs: | ||
- job: Build | ||
pool: ${{ parameters.pool }} | ||
steps: | ||
- task: DotNetCoreInstaller@2 | ||
inputs: | ||
version: ${{ parameters.dotNetCoreVersion }} | ||
|
||
- ${{ if eq(parameters.checkoutSubmodules, 'true') }}: | ||
- checkout: self | ||
submodules: true | ||
|
||
- ${{ if eq(parameters.restoreDependencies, 'true') }}: | ||
- template: restore.yml@templates | ||
parameters: | ||
nuGetServiceConnections: ${{ parameters.nuGetServiceConnections }} | ||
nuGetSources: ${{ parameters.nuGetSources }} | ||
|
||
- script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) --no-restore /p:ContinuousIntegrationBuild=true | ||
displayName: 'dotnet build $(buildConfiguration) with version suffix and no restore' | ||
condition: and(succeeded(), and(eq('${{ parameters.useVersionSuffix }}', 'true'), eq('${{ parameters.restoreDependencies }}', 'true'))) | ||
|
||
- script: dotnet build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) /p:ContinuousIntegrationBuild=true | ||
displayName: 'dotnet build $(buildConfiguration) with version suffix' | ||
condition: and(succeeded(), and(eq('${{ parameters.useVersionSuffix }}', 'true'), eq('${{ parameters.restoreDependencies }}', 'false'))) | ||
|
||
- script: dotnet build --configuration $(buildConfiguration) /p:ContinuousIntegrationBuild=true | ||
displayName: 'dotnet build $(buildConfiguration)' | ||
condition: and(succeeded(), eq('${{ parameters.useVersionSuffix }}', 'false')) | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'dotnet test UnitTests' | ||
inputs: | ||
command: test | ||
projects: '**/*Tests/*Tests.csproj' | ||
arguments: '--configuration $(buildConfiguration) --no-build --no-restore' | ||
|
||
- template: sign-dlls-template.yml | ||
|
||
- ${{ if eq(parameters.packageArtifacts, 'true') }}: | ||
- template: package.yml | ||
parameters: | ||
useVersionSuffix: ${{ parameters.useVersionSuffix }} | ||
|
||
- ${{ if eq(parameters.publishArtifacts, 'true') }}: | ||
- template: publish.yml@templates | ||
parameters: | ||
useVersionSuffix: ${{ parameters.useVersionSuffix }} | ||
publishWebProjects: ${{ parameters.publishWebProjects }} | ||
zipAfterPublish: ${{ parameters.zipAfterPublish }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
parameters: | ||
# Default values | ||
useVersionSuffix: true | ||
|
||
steps: | ||
# Package nugets | ||
- script: dotnet pack --no-build --configuration $(buildConfiguration) --version-suffix $(build.buildNumber) --output $(Build.artifactStagingDirectory)/packages | ||
displayName: 'dotnet pack $(buildConfiguration) with version suffix' | ||
condition: and(succeeded(), eq('${{ parameters.useVersionSuffix }}', 'true')) | ||
|
||
- script: dotnet pack --no-build --configuration $(buildConfiguration) --output $(Build.artifactStagingDirectory)/packages | ||
displayName: 'dotnet pack $(buildConfiguration)' | ||
condition: and(succeeded(), eq('${{ parameters.useVersionSuffix }}', 'false')) | ||
|
||
- template: codesign-nuget-packages.yml@templates | ||
parameters: | ||
certificateValue: $(FirelyCodeSignerCertificate) | ||
certificatePasswordValue: $(CodeSigningPassword) | ||
packagePaths: $(Build.ArtifactStagingDirectory)\packages\*.nupkg | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Artifact: NuGet Packages' | ||
inputs: | ||
pathtoPublish: '$(Build.artifactStagingDirectory)/packages' | ||
artifactName: 'NuGetPackages' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
steps: | ||
- task: DownloadSecureFile@1 | ||
displayName: Download Signing key file | ||
inputs: | ||
secureFile: FhirMetrics.snk | ||
retryCount: | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR | ||
- task: CopyFiles@2 | ||
displayName: Copy key file to $(Build.SourcesDirectory) | ||
inputs: | ||
SourceFolder: $(Agent.TempDirectory) | ||
Contents: FhirMetrics.snk | ||
TargetFolder: $(Build.SourcesDirectory) | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR | ||
- powershell: | | ||
$files = Get-ChildItem -Path $(Build.SourcesDirectory)\src\Fhir.Metrics\bin\Release\*\Fhir.Metrics.dll | ||
Write-Verbose "Last exitcode before signing: $lastexitcode" | ||
foreach ($file in $files) | ||
{ | ||
Write-Verbose "Signing file: $file" | ||
& '$(Build.SourcesDirectory)\build\tools\sn.exe' -R $file $(Build.SourcesDirectory)\FhirMetrics.snk | ||
Write-Verbose "Last exitcode after signing file: $lastexitcode" | ||
} | ||
Write-Verbose "Last exitcode after signing all files: $lastexitcode" | ||
# suppress exitcode | ||
if ($lastexitcode -lt 2) { $global:lastexitcode = 0 } | ||
displayName: Signing the dlls | ||
name: signing | ||
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) # not a PR | ||
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Repo: FirelyTeam/Fhir.Metrics | ||
# File: build/variables.yml | ||
# Variables used during builds. | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
vmImage: 'windows-latest' | ||
DOTNET_CORE_SDK: '7.0.x' | ||
GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in UI of Azure Devops | ||
NUGET_APIKEY: $(NuGetFhirMetricsAPIKey) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,52 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Description>Conversion system for physical units, with UCUM implementation - The Unified Code for Units of Measure</Description> | ||
<Copyright>Copyright 2015, 2016 Furore Health Informatics</Copyright> | ||
<VersionPrefix>1.3.0</VersionPrefix> | ||
<VersionSuffix>alpha</VersionSuffix> | ||
<Authors>Martijn Harthoorn</Authors> | ||
<DebugType>portable</DebugType> | ||
<AssemblyName>Fhir.Metrics</AssemblyName> | ||
<OutputType>Library</OutputType> | ||
<PackageId>Fhir.Metrics</PackageId> | ||
<PackageTags>FHIR UCUM Metrics conversion unit units</PackageTags> | ||
<PackageIconUrl>https://raw.githubusercontent.com/ewoutkramer/fhir-net-api/master/icon-fhir-32.png</PackageIconUrl> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Description>Conversion system for physical units, with UCUM implementation - The Unified Code for Units of Measure</Description> | ||
<Copyright>Copyright 2013-2023 Firely. Contains materials (C) HL7 International</Copyright> | ||
<VersionPrefix>1.2.2</VersionPrefix> | ||
<VersionSuffix>alpha</VersionSuffix> | ||
<Authors>Firely (info@fire.ly) and contributors</Authors> | ||
<Company>Firely (https://fire.ly)</Company> | ||
<DebugType>portable</DebugType> | ||
<AssemblyName>Fhir.Metrics</AssemblyName> | ||
<OutputType>Library</OutputType> | ||
<PackageId>Fhir.Metrics</PackageId> | ||
<PackageTags>FHIR UCUM Metrics conversion unit units</PackageTags> | ||
<PackageIcon>icon-fhir-32.png</PackageIcon> | ||
<PackageReleaseNotes>See https://github.com/FirelyTeam/Fhir.Metrics/releases</PackageReleaseNotes> | ||
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression> | ||
<PackageReadmeFile>\README.md</PackageReadmeFile> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<RepositoryUrl>https://github.com/FirelyTeam/Fhir.Metrics</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\icon-fhir-32.png" Pack="true" PackagePath=""/> | ||
<None Include="..\..\README.md" Pack="true" PackagePath=""/> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="Data\*.xml" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" /> | ||
</ItemGroup> | ||
<!-- Compiler settings --> | ||
<PropertyGroup> | ||
<LangVersion>11.0</LangVersion> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> | ||
<SignAssembly>True</SignAssembly> | ||
<DelaySign>true</DelaySign> | ||
<AssemblyOriginatorKeyFile>..\..\FhirMetrics.publickey</AssemblyOriginatorKeyFile> | ||
<IncludeSymbols>True</IncludeSymbols> | ||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<NoWarn>1591</NoWarn> | ||
<!-- Missing XML comments --> | ||
</PropertyGroup> | ||
|
||
|
||
<ItemGroup> | ||
<EmbeddedResource Include="Data\*.xml" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.