-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
76 lines (70 loc) · 1.88 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: windows-2022
demands:
- msbuild
- visualstudio
steps:
- task: UseDotNet@2
displayName: 'Use .NET 6 Core sdk'
inputs:
packageType: 'sdk'
version: '6.0.x'
includePreviewVersions: true
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: 'Use .NET 5 Core sdk'
inputs:
packageType: 'sdk'
version: '5.x'
includePreviewVersions: true
performMultiLevelLookup: true
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: 'config'
nugetConfigPath: 'src\.NuGet\nuget.config'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'sonar'
organization: 'mouadhjaber'
scannerMode: 'MSBuild'
projectKey: '400c5d2dbcd19c9ce84071c1eb43dcb441f26656'
projectName: 'yourdeals'
extraProperties: sonar.exclusions=**/*.css,**/*.js
- task: VSBuild@1
inputs:
solution: '**\*.sln'
logFileVerbosity : 'diagnostic'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*Tests.dll
!**\*TestAdapter.dll
!**\obj\**
!**\bin\**\ref\**
searchFolder: '$(System.DefaultWorkingDirectory)'
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
publishWebProjects: false
projects: |
**\NPComplet.YourDeals.Client.Web.csproj
**\NPComplet.YourDeals.Server.Api.Blazor.csproj
arguments: '/p:PublishProfile=UAT_Deploy /p:Password=!3bdQt97'
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'