From c14fb5f6bc1ae2b4f1200025e3626286d73631da Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 16:27:35 -0400 Subject: [PATCH 01/13] Added ci.yml for a ci build. --- ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ci.yml diff --git a/ci.yml b/ci.yml new file mode 100644 index 0000000..f6c257b --- /dev/null +++ b/ci.yml @@ -0,0 +1,14 @@ +queue: 'Hosted Linux Preview' + +variables: + buildConfiguration: 'Release' + +steps: +- script: | + dotnet build --configuration $(buildConfiguration) + dotnet test Fabric.Metadata.FileService.Client.Tests --configuration $(buildConfiguration) --logger trx + +- task: PublishTestResults@2 + inputs: + testRunner: VSTest + testResultsFiles: '**/*.trx' \ No newline at end of file From 50ad1ea6b09d9bd92e0d3786e772e27c41dc5295 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 16:40:16 -0400 Subject: [PATCH 02/13] Fixing up newtonsoft.json reference, and adding binding redirects as suggested by VS. --- .../app.config | 220 +++++++++++++++++- 1 file changed, 214 insertions(+), 6 deletions(-) diff --git a/Fabric.Metadata.FileService.Client.Tests/app.config b/Fabric.Metadata.FileService.Client.Tests/app.config index 3fd2154..ff2d30a 100644 --- a/Fabric.Metadata.FileService.Client.Tests/app.config +++ b/Fabric.Metadata.FileService.Client.Tests/app.config @@ -1,15 +1,223 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - \ No newline at end of file + From 983c7c1a25ee4f63b34a66afcd794dac0fcd4499 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 17:06:04 -0400 Subject: [PATCH 03/13] adding in nuget push, commented out for now. --- ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci.yml b/ci.yml index f6c257b..ee2a8c0 100644 --- a/ci.yml +++ b/ci.yml @@ -7,6 +7,15 @@ steps: - script: | dotnet build --configuration $(buildConfiguration) dotnet test Fabric.Metadata.FileService.Client.Tests --configuration $(buildConfiguration) --logger trx + dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $BUILD_ARTIFACTSTAGINGDIRECTORY + +#- task: NuGetCommand@2 +# inputs: +# command: push +# nuGetFeedType: external +# publishFeedCredentials: 'Nuget.org Health Catalyst Account' +# versioningScheme: byEnvVar +# versionEnvVar: Version - task: PublishTestResults@2 inputs: From a58d3b2bc1a209f44f597cb9b2565f03773bcc02 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 20:52:20 -0400 Subject: [PATCH 04/13] Switch to hosted vs2017 agent since we are building .net framework projects. --- ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index ee2a8c0..ddfdaf3 100644 --- a/ci.yml +++ b/ci.yml @@ -1,4 +1,4 @@ -queue: 'Hosted Linux Preview' +queue: 'Hosted VS2017' variables: buildConfiguration: 'Release' From a94c606bfb9b20e468a259fd5c887ed2bb25d76a Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:07:42 -0400 Subject: [PATCH 05/13] Only build .net standard project with dotnet build. --- ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.yml b/ci.yml index ddfdaf3..f863236 100644 --- a/ci.yml +++ b/ci.yml @@ -5,8 +5,8 @@ variables: steps: - script: | - dotnet build --configuration $(buildConfiguration) - dotnet test Fabric.Metadata.FileService.Client.Tests --configuration $(buildConfiguration) --logger trx + dotnet build Fabric.Metadata.FileService.Client --configuration $(buildConfiguration) +# dotnet test Fabric.Metadata.FileService.Client.Tests --configuration $(buildConfiguration) --logger trx dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $BUILD_ARTIFACTSTAGINGDIRECTORY #- task: NuGetCommand@2 From 36078e4a7055d13ae227d6f5c1752b91db3e4f1b Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:11:06 -0400 Subject: [PATCH 06/13] Fixing error in yaml --- ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci.yml b/ci.yml index f863236..f72dfbf 100644 --- a/ci.yml +++ b/ci.yml @@ -6,7 +6,6 @@ variables: steps: - script: | dotnet build Fabric.Metadata.FileService.Client --configuration $(buildConfiguration) -# dotnet test Fabric.Metadata.FileService.Client.Tests --configuration $(buildConfiguration) --logger trx dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $BUILD_ARTIFACTSTAGINGDIRECTORY #- task: NuGetCommand@2 From dd7da9f0fc92a838337fb1a4be77c9a5a53b9389 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:13:43 -0400 Subject: [PATCH 07/13] Fixing environment variable syntax. --- ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index f72dfbf..880e3ca 100644 --- a/ci.yml +++ b/ci.yml @@ -6,7 +6,7 @@ variables: steps: - script: | dotnet build Fabric.Metadata.FileService.Client --configuration $(buildConfiguration) - dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $BUILD_ARTIFACTSTAGINGDIRECTORY + dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $(BUILD_ARTIFACTSTAGINGDIRECTORY) #- task: NuGetCommand@2 # inputs: From feb88d3167e0317b70b1ea120ee48c6342e63f24 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:16:56 -0400 Subject: [PATCH 08/13] Fixing environment variable syntax --- ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index 880e3ca..e1335f7 100644 --- a/ci.yml +++ b/ci.yml @@ -6,7 +6,7 @@ variables: steps: - script: | dotnet build Fabric.Metadata.FileService.Client --configuration $(buildConfiguration) - dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $(BUILD_ARTIFACTSTAGINGDIRECTORY) + dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $(Build.ArtifactStagingDirectory) #- task: NuGetCommand@2 # inputs: From 7abc2736577c25fb832f77838ac3242151eeae63 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:27:38 -0400 Subject: [PATCH 09/13] Adding in tasks to build full framework components. --- ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ci.yml b/ci.yml index e1335f7..af348be 100644 --- a/ci.yml +++ b/ci.yml @@ -8,6 +8,23 @@ steps: dotnet build Fabric.Metadata.FileService.Client --configuration $(buildConfiguration) dotnet pack Fabric.Metadata.FileService.Client --configuration Release --output $(Build.ArtifactStagingDirectory) +- task: NuGetInstaller@0 + displayName: 'NuGet restore' + inputs: + solution: '**\Fabric.Metadata.FileService.Client.sln' + nugetConfigPath: Nuget.Config + noCache: true + verbosity: Detailed + +- task: VSBuild@1 + displayName: Build + inputs: + solution: Api.Metadata/v2/Catalyst.Metadata.v2/Api.Metadata.v2.sln + vsVersion: 15.0 + platform: '$(BuildPlatform)' + configuration: '$(BuildConfiguration)' + clean: true + #- task: NuGetCommand@2 # inputs: # command: push From c2c328651747deba44e1767d27a5c3dd904ca5cd Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:30:20 -0400 Subject: [PATCH 10/13] Remove nuget config --- ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/ci.yml b/ci.yml index af348be..c9c8aa3 100644 --- a/ci.yml +++ b/ci.yml @@ -12,7 +12,6 @@ steps: displayName: 'NuGet restore' inputs: solution: '**\Fabric.Metadata.FileService.Client.sln' - nugetConfigPath: Nuget.Config noCache: true verbosity: Detailed From 8434e94405f54952bf9746679fdd5f72c4f22375 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:32:20 -0400 Subject: [PATCH 11/13] Fixing solution file path. --- ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index c9c8aa3..26f87db 100644 --- a/ci.yml +++ b/ci.yml @@ -18,7 +18,7 @@ steps: - task: VSBuild@1 displayName: Build inputs: - solution: Api.Metadata/v2/Catalyst.Metadata.v2/Api.Metadata.v2.sln + solution: '**\Fabric.Metadata.FileService.Client.sln' vsVersion: 15.0 platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' From 2b1858b5ff079211cbfd494bd90cf14e2de044a3 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:39:16 -0400 Subject: [PATCH 12/13] adding tests. --- ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index 26f87db..20b00e3 100644 --- a/ci.yml +++ b/ci.yml @@ -20,10 +20,17 @@ steps: inputs: solution: '**\Fabric.Metadata.FileService.Client.sln' vsVersion: 15.0 - platform: '$(BuildPlatform)' configuration: '$(BuildConfiguration)' clean: true +- task: VSTest@1 + displayName: 'Run Tests' + inputs: + testAssembly: 'Fabric.Metadata.FileService.Client\**\$(BuildConfiguration)\*test*.dll;-:**\obj\**' + codeCoverageEnabled: true + runInParallel: true + configuration: '$(BuildConfiguration)' + #- task: NuGetCommand@2 # inputs: # command: push From 5c4bceb311ded1dee8e480c367ff6bbeb7de13f9 Mon Sep 17 00:00:00 2001 From: "michael.vidal" Date: Thu, 6 Sep 2018 21:45:19 -0400 Subject: [PATCH 13/13] Fix path to tests. --- ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.yml b/ci.yml index 20b00e3..8db3405 100644 --- a/ci.yml +++ b/ci.yml @@ -26,7 +26,7 @@ steps: - task: VSTest@1 displayName: 'Run Tests' inputs: - testAssembly: 'Fabric.Metadata.FileService.Client\**\$(BuildConfiguration)\*test*.dll;-:**\obj\**' + testAssembly: 'Fabric.Metadata.FileService.Client.Tests\**\$(BuildConfiguration)\*test*.dll;-:**\obj\**' codeCoverageEnabled: true runInParallel: true configuration: '$(BuildConfiguration)'