Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SourceBrowser" Version="1.0.23" PrivateAssets="All" />
</ItemGroup>
<Target Name="GenerateSourceBrowserWebsite" AfterTargets="PostBuildEvent" Condition=" '$(OS)' == 'Windows_NT' ">
<Exec Command="$(PkgSourceBrowser)\tools\HtmlGenerator.exe $(MSBuildProjectDirectory)\..\All.sln /out:$(ProjectDir)bin\Index /force" />
</Target>
</Project>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
240 changes: 138 additions & 102 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,108 +6,144 @@
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: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
jobs:
- job: Build
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: 'FollowingFileStream/*.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

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/sourcebrowser_website.zip'
ArtifactName: 'sourcebrowser_website'
publishLocation: 'Container'