-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
48 lines (39 loc) · 1.27 KB
/
azure-pipelines.yml
File metadata and controls
48 lines (39 loc) · 1.27 KB
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
# 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: 'Ubuntu-16.04'
variables:
buildConfiguration: 'Release'
steps:
- task: SonarCloudPrepare@1
displayName: 'Prepare SonarCloud analysis'
inputs:
SonarCloud: 'SonarCloudHZ'
organization: '$(organization)'
projectKey: '$(projectKey)'
projectName: '$(projectName)'
projectVersion: '$(Build.BuildNumber)'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: '**/*.csproj'
arguments: '--configuration $(buildConfiguration)' # Update this to match your need
- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud code analysis'
- task: SonarCloudPublish@1
displayName: 'Publish SonarCloud quality gate results'
# Create the deployment package for your web project
#- task: DotNetCoreCLI@2
# displayName: ".NET publish package"
# inputs:
# command: publish
# arguments: '--configuration $(BuildConfiguration) --no-restore --output $(Build.ArtifactStagingDirectory)/app/pkg'
#- task: PublishBuildArtifacts@1
# inputs:
# pathtoPublish: $(Build.ArtifactStagingDirectory)
# artifactName: MyBuildOutputs