Skip to content

Commit e6c08c2

Browse files
committed
Merge branch 'vnext' into feature/ci-cd
2 parents 415c959 + d4a0b8e commit e6c08c2

File tree

4 files changed

+158
-3
lines changed

4 files changed

+158
-3
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
5+
6+
trigger:
7+
branches:
8+
include:
9+
- master
10+
pr: none
11+
12+
pool:
13+
name: Azure Pipelines
14+
vmImage: windows-latest
15+
demands:
16+
- msbuild
17+
- vstest
18+
19+
steps:
20+
- task: NuGetCommand@2
21+
displayName: 'NuGet restore'
22+
23+
- task: MSBuild@1
24+
displayName: 'Build solution **/*.sln'
25+
inputs:
26+
configuration: Release
27+
28+
- task: VSTest@2
29+
displayName: 'XUnit Tests'
30+
inputs:
31+
testAssemblyVer2: |
32+
**\*.Tests.dll
33+
34+
vsTestVersion: 16.0
35+
codeCoverageEnabled: true
36+
37+
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
38+
displayName: 'ESRP CodeSigning'
39+
inputs:
40+
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
41+
FolderPath: src
42+
signConfigType: inlineSignParams
43+
inlineOperation: |
44+
[
45+
{
46+
"keyCode": "CP-230012",
47+
"operationSetCode": "SigntoolSign",
48+
"parameters": [
49+
{
50+
"parameterName": "OpusName",
51+
"parameterValue": "Microsoft"
52+
},
53+
{
54+
"parameterName": "OpusInfo",
55+
"parameterValue": "http://www.microsoft.com"
56+
},
57+
{
58+
"parameterName": "FileDigest",
59+
"parameterValue": "/fd \"SHA256\""
60+
},
61+
{
62+
"parameterName": "PageHash",
63+
"parameterValue": "/NPH"
64+
},
65+
{
66+
"parameterName": "TimeStamp",
67+
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
68+
}
69+
],
70+
"toolName": "sign",
71+
"toolVersion": "1.0"
72+
},
73+
{
74+
"keyCode": "CP-230012",
75+
"operationSetCode": "SigntoolVerify",
76+
"parameters": [ ],
77+
"toolName": "sign",
78+
"toolVersion": "1.0"
79+
}
80+
]
81+
SessionTimeout: 20
82+
83+
- task: MSBuild@1
84+
displayName: 'Pack OpenAPI'
85+
inputs:
86+
solution: src/Microsoft.OpenApi/Microsoft.OpenApi.csproj
87+
configuration: Release
88+
msbuildArguments: '/t:pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg'
89+
90+
- task: MSBuild@1
91+
displayName: 'Pack OpenAPI Readers'
92+
inputs:
93+
solution: src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj
94+
configuration: Release
95+
msbuildArguments: '/t:pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory) /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg'
96+
97+
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
98+
displayName: 'ESRP CodeSigning Nuget Packages'
99+
inputs:
100+
ConnectedServiceName: 'microsoftgraph ESRP CodeSign DLL and NuGet (AKV)'
101+
FolderPath: '$(Build.ArtifactStagingDirectory)'
102+
Pattern: '*.nupkg'
103+
signConfigType: inlineSignParams
104+
inlineOperation: |
105+
[
106+
{
107+
"keyCode": "CP-401405",
108+
"operationSetCode": "NuGetSign",
109+
"parameters": [ ],
110+
"toolName": "sign",
111+
"toolVersion": "1.0"
112+
},
113+
{
114+
"keyCode": "CP-401405",
115+
"operationSetCode": "NuGetVerify",
116+
"parameters": [ ],
117+
"toolName": "sign",
118+
"toolVersion": "1.0"
119+
}
120+
]
121+
SessionTimeout: 20
122+
123+
- task: PublishBuildArtifacts@1
124+
displayName: 'Publish Artifact: Nugets'
125+
inputs:
126+
ArtifactName: Nugets

src/Microsoft.OpenApi.Readers/Microsoft.OpenApi.Readers.csproj

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,31 @@
1414
<Description>OpenAPI.NET Readers for JSON and YAML documents</Description>
1515
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
1616
<PackageTags>OpenAPI .NET</PackageTags>
17-
17+
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET</RepositoryUrl>
18+
<PackageReleaseNotes>
19+
- Publish symbols.
20+
</PackageReleaseNotes>
1821
<AssemblyName>Microsoft.OpenApi.Readers</AssemblyName>
1922
<RootNamespace>Microsoft.OpenApi.Readers</RootNamespace>
2023
<SignAssembly>true</SignAssembly>
24+
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
25+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2126
</PropertyGroup>
2227

2328
<PropertyGroup>
2429
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.OpenApi.xml</DocumentationFile>
2530
<AssemblyOriginatorKeyFile>..\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
2631
</PropertyGroup>
2732

33+
<!-- https://github.com/clairernovotny/DeterministicBuilds#deterministic-builds -->
34+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
35+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
36+
</PropertyGroup>
37+
38+
<ItemGroup>
39+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
40+
</ItemGroup>
41+
2842
<ItemGroup>
2943
<PackageReference Include="SharpYaml" Version="1.6.6" />
3044
</ItemGroup>

src/Microsoft.OpenApi/Microsoft.OpenApi.csproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,31 @@
1414
<Description>.NET models with JSON and YAML writers for OpenAPI specification</Description>
1515
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
1616
<PackageTags>OpenAPI .NET</PackageTags>
17-
17+
<RepositoryUrl>https://github.com/Microsoft/OpenAPI.NET</RepositoryUrl>
18+
<PackageReleaseNotes>
19+
- Publish symbols.
20+
</PackageReleaseNotes>
1821
<AssemblyName>Microsoft.OpenApi</AssemblyName>
1922
<RootNamespace>Microsoft.OpenApi</RootNamespace>
2023
<SignAssembly>true</SignAssembly>
24+
<!-- https://github.com/dotnet/sourcelink/blob/main/docs/README.md#embeduntrackedsources -->
25+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2126
</PropertyGroup>
2227

2328
<PropertyGroup>
2429
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Microsoft.OpenApi.xml</DocumentationFile>
2530
<AssemblyOriginatorKeyFile>..\Microsoft.OpenApi.snk</AssemblyOriginatorKeyFile>
2631
</PropertyGroup>
27-
32+
33+
<!-- https://github.com/clairernovotny/DeterministicBuilds#deterministic-builds -->
34+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
35+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
36+
</PropertyGroup>
37+
38+
<ItemGroup>
39+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
40+
</ItemGroup>
41+
2842
<ItemGroup>
2943
<Compile Update="Properties\SRResource.Designer.cs">
3044
<DesignTime>True</DesignTime>

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/Microsoft/OpenAPI.NET")]
12
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Readers.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
23
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(@"Microsoft.OpenApi.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100957cb48387b2a5f54f5ce39255f18f26d32a39990db27cf48737afc6bc62759ba996b8a2bfb675d4e39f3d06ecb55a178b1b4031dcb2a767e29977d88cce864a0d16bfc1b3bebb0edf9fe285f10fffc0a85f93d664fa05af07faa3aad2e545182dbf787e3fd32b56aca95df1a3c4e75dec164a3f1a4c653d971b01ffc39eb3c4")]
34
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]

0 commit comments

Comments
 (0)