From e2127ffbccdcbb2b1fd10e74b6495a8db42aa5df Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:06:28 +0200 Subject: [PATCH 01/13] Add SourceBrowser website generation --- FollowingFileStream/FollowingFileStream.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FollowingFileStream/FollowingFileStream.csproj b/FollowingFileStream/FollowingFileStream.csproj index 51ed82b..ee7b308 100644 --- a/FollowingFileStream/FollowingFileStream.csproj +++ b/FollowingFileStream/FollowingFileStream.csproj @@ -18,5 +18,9 @@ + + + + \ No newline at end of file From aaee8713c8981b209bfd52c2047bdc85ee2f2c4c Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:07:28 +0200 Subject: [PATCH 02/13] Update azure-pipelines.yml for source browser website --- azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eab6a82..9e0f4ee 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -110,4 +110,11 @@ steps: inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' + publishLocation: 'Container' + +- task: PublishBuildArtifacts@1 + displayName: Publish source browser website + inputs: + PathtoPublish: '$(Build.SourcesDirectory)/bin/$(ConfigurationName)/netstandard2.0/Index' + ArtifactName: 'sourcebrowser_website' publishLocation: 'Container' \ No newline at end of file From 51754229d29cc9141159a09ccd7b0275c46dbf97 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:14:15 +0200 Subject: [PATCH 03/13] Update azure-pipelines.yml for source browser website fix --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9e0f4ee..68fb6ea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,7 +114,8 @@ steps: - task: PublishBuildArtifacts@1 displayName: Publish source browser website + condition: eq( variables['Agent.OS'], 'Windows_NT' ) inputs: - PathtoPublish: '$(Build.SourcesDirectory)/bin/$(ConfigurationName)/netstandard2.0/Index' + PathtoPublish: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/netstandard2.0/Index' ArtifactName: 'sourcebrowser_website' publishLocation: 'Container' \ No newline at end of file From 8b490099f04807edde265a2621e9f2355a8f63d8 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:22:04 +0200 Subject: [PATCH 04/13] Execute HtmlGenerator.exe on Windows only --- FollowingFileStream/FollowingFileStream.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FollowingFileStream/FollowingFileStream.csproj b/FollowingFileStream/FollowingFileStream.csproj index ee7b308..1bc6aee 100644 --- a/FollowingFileStream/FollowingFileStream.csproj +++ b/FollowingFileStream/FollowingFileStream.csproj @@ -20,7 +20,7 @@ - + \ No newline at end of file From d6c83fde0a44008b5e778c3ec059cd2ee301d916 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:24:16 +0200 Subject: [PATCH 05/13] Update azure-pipelines.yml for path fix to source browser website --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68fb6ea..85ee59d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,6 +116,6 @@ steps: displayName: Publish source browser website condition: eq( variables['Agent.OS'], 'Windows_NT' ) inputs: - PathtoPublish: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/netstandard2.0/Index' + PathtoPublish: '$(Build.SourcesDirectory)/FollowingFileStream/bin/$(BuildConfiguration)/netstandard2.0/Index' ArtifactName: 'sourcebrowser_website' publishLocation: 'Container' \ No newline at end of file From 1ffe6423812840e8d042feaa53f305a2aebdc93d Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:28:50 +0200 Subject: [PATCH 06/13] Fix OS variable --- FollowingFileStream/FollowingFileStream.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FollowingFileStream/FollowingFileStream.csproj b/FollowingFileStream/FollowingFileStream.csproj index 1bc6aee..01a4724 100644 --- a/FollowingFileStream/FollowingFileStream.csproj +++ b/FollowingFileStream/FollowingFileStream.csproj @@ -20,7 +20,7 @@ - + \ No newline at end of file From 30f50b6fe0cdb70b9f96e508fa0f65884469956d Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:44:09 +0200 Subject: [PATCH 07/13] Update azure-pipelines.yml for zip of sourcebrowser website --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 85ee59d..4efcf57 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -112,10 +112,10 @@ steps: ArtifactName: 'drop' publishLocation: 'Container' -- task: PublishBuildArtifacts@1 - displayName: Publish source browser website - condition: eq( variables['Agent.OS'], 'Windows_NT' ) +- task: ArchiveFiles@2 inputs: - PathtoPublish: '$(Build.SourcesDirectory)/FollowingFileStream/bin/$(BuildConfiguration)/netstandard2.0/Index' - ArtifactName: 'sourcebrowser_website' - publishLocation: 'Container' \ No newline at end of file + rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream/bin/$(BuildConfiguration)/netstandard2.0/Index' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' + replaceExistingArchive: true From 5265b89f5d118ddf13a485e3a428a0afa16377f8 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 00:46:09 +0200 Subject: [PATCH 08/13] Update azure-pipelines.yml for zip before publish --- azure-pipelines.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4efcf57..a152c2d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -106,16 +106,18 @@ steps: IndexSources: false SymbolServerType: 'TeamServices' -- task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'drop' - publishLocation: 'Container' - - task: ArchiveFiles@2 + displayName: Zip source browser website + condition: eq( variables['Agent.OS'], 'Windows_NT' ) inputs: rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream/bin/$(BuildConfiguration)/netstandard2.0/Index' includeRootFolder: false archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' replaceExistingArchive: true + +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' From 7757923c839ec2d0fcc0e8f0d14cce23fb62e61a Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 20:51:26 +0200 Subject: [PATCH 09/13] Move source browser gen as a separate build job --- .../FollowingFileStream.SourceBrowser.csproj | 11 + .../FollowingFileStream.csproj | 4 - azure-pipelines.yml | 244 ++++++++++-------- 3 files changed, 143 insertions(+), 116 deletions(-) create mode 100644 FollowingFileStream.SourceBrowser/FollowingFileStream.SourceBrowser.csproj diff --git a/FollowingFileStream.SourceBrowser/FollowingFileStream.SourceBrowser.csproj b/FollowingFileStream.SourceBrowser/FollowingFileStream.SourceBrowser.csproj new file mode 100644 index 0000000..f5b8f1d --- /dev/null +++ b/FollowingFileStream.SourceBrowser/FollowingFileStream.SourceBrowser.csproj @@ -0,0 +1,11 @@ + + + netstandard2.0 + + + + + + + + \ No newline at end of file diff --git a/FollowingFileStream/FollowingFileStream.csproj b/FollowingFileStream/FollowingFileStream.csproj index 01a4724..51ed82b 100644 --- a/FollowingFileStream/FollowingFileStream.csproj +++ b/FollowingFileStream/FollowingFileStream.csproj @@ -18,9 +18,5 @@ - - - - \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a152c2d..f195278 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,118 +6,138 @@ trigger: - master -strategy: - matrix: - linux: - imageName: 'ubuntu-latest' - mac: - imageName: 'macos-latest' - windows: - imageName: 'windows-latest' - -pool: - vmImage: $(imageName) - variables: buildConfiguration: 'Release' -steps: -- task: GitVersion@5 - inputs: - runtime: 'core' -- task: SonarCloudPrepare@1 - inputs: - SonarCloud: 'SonarCloud' - organization: 'manandre' - scannerMode: 'MSBuild' - projectKey: 'manandre_FollowingFileStream' - projectVersion: '$(Build.BuildId)' - extraProperties: 'sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/coverage/coverage.opencover.xml' - -- task: DotNetCoreCLI@2 - displayName: Restore - inputs: - command: 'restore' - projects: '**/*.csproj' - feedsToUse: 'select' - versioningScheme: byBuildNumber - -- task: DotNetCoreCLI@2 - displayName: Build - inputs: - command: 'build' - projects: 'All.sln' # Mandatory for SonarQube !?! - arguments: '--configuration $(BuildConfiguration) /p:Version=$(GitVersion.NuGetVersion)' - versioningScheme: byBuildNumber - -- task: DotNetCoreCLI@2 - displayName: Test - inputs: - command: 'test' - projects: '**/*.Tests.csproj' - arguments: '--configuration $(buildConfiguration) --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(Build.SourcesDirectory)/coverage/' - publishTestResults: false - -- task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - inputs: - testRunner: VSTest - testResultsFiles: '**/*.trx' - -- script: | - dotnet tool install dotnet-reportgenerator-globaltool --tool-path . - ./reportgenerator "-reports:$(Build.SourcesDirectory)/coverage/coverage.opencover.xml" "-targetdir:coverage/Cobertura" "-reporttypes:Cobertura;HTMLInline;HTMLChart" - condition: eq( variables['Agent.OS'], 'Linux' ) - displayName: Run Reportgenerator on Linux - -- script: | - dotnet tool install dotnet-reportgenerator-globaltool --tool-path . - .\reportgenerator.exe "-reports:$(Build.SourcesDirectory)/coverage/coverage.opencover.xml" "-targetdir:coverage/Cobertura" "-reporttypes:Cobertura;HTMLInline;HTMLChart" - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Run Reportgenerator on Windows - -- task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: 'Cobertura' - summaryFileLocation: $(Build.SourcesDirectory)/coverage/Cobertura/Cobertura.xml - -- task: SonarCloudAnalyze@1 - -- task: SonarCloudPublish@1 - inputs: - pollingTimeoutSec: '300' - -- task: DotNetCoreCLI@2 - displayName: Pack - inputs: - command: 'pack' - packagesToPack: '**/*.csproj' - nobuild: true - versioningScheme: 'byEnvVar' - versionEnvVar: 'GitVersion.NuGetVersion' - -- task: PublishSymbols@2 - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - inputs: - SearchPattern: | - **/bin/**/FollowingFileStream.pdb - **/bin/**/FollowingFileStream.dll - IndexSources: false - SymbolServerType: 'TeamServices' - -- task: ArchiveFiles@2 - displayName: Zip source browser website - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - inputs: - rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream/bin/$(BuildConfiguration)/netstandard2.0/Index' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' - replaceExistingArchive: true - -- task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'drop' - publishLocation: 'Container' +jobs: + - job: Main + strategy: + matrix: + linux: + imageName: 'ubuntu-latest' + mac: + imageName: 'macos-latest' + windows: + imageName: 'windows-latest' + + pool: + vmImage: $(imageName) + + steps: + - task: GitVersion@5 + inputs: + runtime: 'core' + - task: SonarCloudPrepare@1 + inputs: + SonarCloud: 'SonarCloud' + organization: 'manandre' + scannerMode: 'MSBuild' + projectKey: 'manandre_FollowingFileStream' + projectVersion: '$(Build.BuildId)' + extraProperties: 'sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/coverage/coverage.opencover.xml' + + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: 'restore' + projects: '**/*.csproj' + feedsToUse: 'select' + versioningScheme: byBuildNumber + + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: 'All.sln' # Mandatory for SonarQube !?! + arguments: '--configuration $(BuildConfiguration) /p:Version=$(GitVersion.NuGetVersion)' + versioningScheme: byBuildNumber + + - task: DotNetCoreCLI@2 + displayName: Test + inputs: + command: 'test' + projects: '**/*.Tests.csproj' + arguments: '--configuration $(buildConfiguration) --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(Build.SourcesDirectory)/coverage/' + publishTestResults: false + + - task: PublishTestResults@2 + displayName: Publish Test Results + condition: succeededOrFailed() + inputs: + testRunner: VSTest + testResultsFiles: '**/*.trx' + + - script: | + dotnet tool install dotnet-reportgenerator-globaltool --tool-path . + ./reportgenerator "-reports:$(Build.SourcesDirectory)/coverage/coverage.opencover.xml" "-targetdir:coverage/Cobertura" "-reporttypes:Cobertura;HTMLInline;HTMLChart" + condition: eq( variables['Agent.OS'], 'Linux' ) + displayName: Run Reportgenerator on Linux + + - script: | + dotnet tool install dotnet-reportgenerator-globaltool --tool-path . + .\reportgenerator.exe "-reports:$(Build.SourcesDirectory)/coverage/coverage.opencover.xml" "-targetdir:coverage/Cobertura" "-reporttypes:Cobertura;HTMLInline;HTMLChart" + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Run Reportgenerator on Windows + + - task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: 'Cobertura' + summaryFileLocation: $(Build.SourcesDirectory)/coverage/Cobertura/Cobertura.xml + + - task: SonarCloudAnalyze@1 + + - task: SonarCloudPublish@1 + inputs: + pollingTimeoutSec: '300' + + - task: DotNetCoreCLI@2 + displayName: Pack + inputs: + command: 'pack' + packagesToPack: '**/*.csproj' + nobuild: true + versioningScheme: 'byEnvVar' + versionEnvVar: 'GitVersion.NuGetVersion' + + - task: PublishSymbols@2 + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + inputs: + SearchPattern: | + **/bin/**/FollowingFileStream.pdb + **/bin/**/FollowingFileStream.dll + IndexSources: false + SymbolServerType: 'TeamServices' + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' + +- job: SourceBrowser + displayName: Source Browser generation + pool: + vmImage: 'windows-latest' + steps: + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: 'restore' + projects: '**/*.SourceBrowser.csproj' + feedsToUse: 'select' + + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: '**/*.SourceBrowser.csproj' + arguments: '--configuration $(BuildConfiguration)' + + - task: ArchiveFiles@2 + displayName: Zip source browser website + inputs: + rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream.SourceBrowser/bin/Index' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' + replaceExistingArchive: true From c908a2e83438d4f0e8433f8b4ef2d6d46d9d09f3 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 20:56:18 +0200 Subject: [PATCH 10/13] Update azure-pipelines.yml for missing tab --- azure-pipelines.yml | 54 ++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f195278..8dd6821 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,30 +114,30 @@ jobs: ArtifactName: 'drop' publishLocation: 'Container' -- job: SourceBrowser - displayName: Source Browser generation - pool: - vmImage: 'windows-latest' - steps: - - task: DotNetCoreCLI@2 - displayName: Restore - inputs: - command: 'restore' - projects: '**/*.SourceBrowser.csproj' - feedsToUse: 'select' - - - task: DotNetCoreCLI@2 - displayName: Build - inputs: - command: 'build' - projects: '**/*.SourceBrowser.csproj' - arguments: '--configuration $(BuildConfiguration)' - - - task: ArchiveFiles@2 - displayName: Zip source browser website - inputs: - rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream.SourceBrowser/bin/Index' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' - replaceExistingArchive: true + - job: SourceBrowser + displayName: Source Browser generation + pool: + vmImage: 'windows-latest' + steps: + - task: DotNetCoreCLI@2 + displayName: Restore + inputs: + command: 'restore' + projects: '**/*.SourceBrowser.csproj' + feedsToUse: 'select' + + - task: DotNetCoreCLI@2 + displayName: Build + inputs: + command: 'build' + projects: '**/*.SourceBrowser.csproj' + arguments: '--configuration $(BuildConfiguration)' + + - task: ArchiveFiles@2 + displayName: Zip source browser website + inputs: + rootFolderOrFile: '$(Build.SourcesDirectory)/FollowingFileStream.SourceBrowser/bin/Index' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' + replaceExistingArchive: true From 80df7d25aae898d3ab939f9f9e2b3e91f1664d34 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 21:05:07 +0200 Subject: [PATCH 11/13] Pack only main dll --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8dd6821..50f6b3d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,7 +10,7 @@ variables: buildConfiguration: 'Release' jobs: - - job: Main + - job: Build strategy: matrix: linux: @@ -94,7 +94,7 @@ jobs: displayName: Pack inputs: command: 'pack' - packagesToPack: '**/*.csproj' + packagesToPack: 'FollowingFileStream/*.csproj' nobuild: true versioningScheme: 'byEnvVar' versionEnvVar: 'GitVersion.NuGetVersion' From 151c4805571920a465b695900f23b7a02417e0d3 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 21:20:34 +0200 Subject: [PATCH 12/13] Update azure-pipelines.yml for publish sourcebrowser website --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 50f6b3d..112f9ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -141,3 +141,9 @@ jobs: archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' replaceExistingArchive: true + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip' + ArtifactName: 'sourcebrowser_website' + publishLocation: 'Container' From b6fce8484e86aea4e17496ac33d32a41bf218683 Mon Sep 17 00:00:00 2001 From: manandre <2341261+manandre@users.noreply.github.com> Date: Mon, 9 Sep 2019 21:35:44 +0200 Subject: [PATCH 13/13] Add link to sourcebrowser website on README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4fd26b7..e1cf3f3 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Any read operation will not report a zero result while the file is locked for wr It is usually compared to the "tail -f" approach. +[Source Browser](https://followingfilestream.azurewebsites.net/#FollowingFileStream/) [![Build Status](https://dev.azure.com/manandre/manandre/_apis/build/status/manandre.FollowingFileStream?branchName=master)](https://dev.azure.com/manandre/manandre/_build/latest?definitionId=1&branchName=master)