-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
9 additions
and
61 deletions.
There are no files selected for viewing
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,68 +1,16 @@ | ||
# Starter pipeline | ||
|
||
|
||
trigger: | ||
- none | ||
- DebugPME | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
vmImage: ubuntu-latest | ||
|
||
steps: | ||
- task: UseDotNet@2 | ||
displayName: 'Use .NET Core SDK 2.1.505 for SonarCloud' | ||
inputs: | ||
version: '2.1.505' | ||
|
||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: 'restore' | ||
projects: '**/*.csproj' | ||
feedsToUse: 'select' | ||
|
||
# Add SonarCloud Prepare | ||
|
||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: 'build' | ||
projects: '**/*.csproj' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Install ReportGenerator' | ||
inputs: | ||
command: custom | ||
custom: tool | ||
arguments: 'install --global dotnet-reportgenerator-globaltool' | ||
|
||
- task: DotNetCoreCLI@2 | ||
displayName: 'Run unit tests' | ||
inputs: | ||
command: 'test' | ||
arguments: '--no-build --configuration Debug /p:CollectCoverage=true /p:CoverletOutputFormat="cobertura%2copencover" /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/' | ||
publishTestResults: true | ||
projects: '**/*Tests.csproj' | ||
- script: echo Hello, world! | ||
displayName: 'Run a one-line script' | ||
|
||
- script: | | ||
reportgenerator -reports:$(Build.SourcesDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/CodeCoverage -reporttypes:HtmlInline_AzurePipelines | ||
displayName: 'Create code coverage report' | ||
|
||
# SonarCloudAnalyze | ||
# SonarCloudPublish | ||
|
||
- task: PublishCodeCoverageResults@1 | ||
displayName: 'Publish code coverage report' | ||
inputs: | ||
codeCoverageTool: 'cobertura' | ||
summaryFileLocation: '$(Build.SourcesDirectory)/**/coverage.cobertura.xml' | ||
|
||
- task: CopyFiles@2 | ||
inputs: | ||
SourceFolder: '$(System.DefaultWorkingDirectory)/SonarCloud/bin' | ||
Contents: '**' | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)' | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)' | ||
ArtifactName: 'drop' | ||
publishLocation: 'Container' | ||
|
||
- script: echo All done | ||
displayName: 'All done' | ||
echo Add other tasks to build, test, and deploy your project. | ||
displayName: 'Run a multi-line script' |