1
1
variables :
2
- # AZURE_CLIENT_SECRET and SQLPASSWORD must be defined as secret variables in the pipeline.
3
- # AZURE_TENANT_ID and AZURE_CLIENT_ID are not expected to be secret variables, just regular variables
4
- AZURECLIENTSECRET : $(AZURE_CLIENT_SECRET)
5
2
PASSWORD : $(SQLPASSWORD)
6
3
pool :
7
4
vmImage : ' ubuntu-latest'
@@ -21,34 +18,33 @@ steps:
21
18
SQLCMDUSER : sa
22
19
SQLPASSWORD : $(PASSWORD)
23
20
24
- # The use of client secrets is disallowed now, so commenting out the Azure tests until we can switch to a federated credential.
25
- # - template: include-runtests-linux.yml
26
- # parameters:
27
- # RunName: 'SQLDB'
28
- # # AZURESERVER must be defined as a variable in the pipeline
29
- # SQLCMDSERVER: $(AZURESERVER)
30
- # AZURECLIENTSECRET: $(AZURECLIENTSECRET)
31
-
32
- - task : Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
33
- displayName : Merge coverage data
21
+ - task : AzureCLI@2
34
22
inputs :
35
- reports : ' **/*.coverage.xml"' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
36
- targetdir : ' coverage' # REQUIRED # The directory where the generated report should be saved.
37
- reporttypes : ' HtmlInline_AzurePipelines;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
38
- sourcedirs : ' $(Build.SourcesDirectory)' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information.
39
- verbosity : ' Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
40
- tag : ' $(build.buildnumber)_#$(build.buildid)_$(Build.SourceBranchName)' # Optional tag or build version.
41
- - task : PublishCodeCoverageResults@1
23
+ addSpnToEnvironment : true
24
+ azureSubscription : $(AZURESUBSCRIPTION_SERVICE_CONNECTION_NAME)
25
+ scriptType : pscore
26
+ scriptLocation : inlineScript
27
+ inlineScript : |
28
+ Write-Host "##vso[task.setvariable variable=AZURESUBSCRIPTION_CLIENT_ID;]$env:AZURESUBSCRIPTION_CLIENT_ID"
29
+ Write-Host "##vso[task.setvariable variable=AZURESUBSCRIPTION_TENANT_ID;]$env:AZURESUBSCRIPTION_TENANT_ID"
30
+ gci env:* | sort-object name
31
+
32
+ - template : include-runtests-linux.yml
33
+ parameters :
34
+ RunName : ' SQLDB'
35
+ # AZURESERVER must be defined as a variable in the pipeline
36
+ SQLCMDSERVER : $(AZURESERVER)
37
+ - task : UseDotNet@2
38
+ inputs :
39
+ packageType : ' runtime'
40
+ version : ' 8.x'
41
+
42
+ - task : PublishCodeCoverageResults@2
42
43
inputs :
43
- codeCoverageTool : Cobertura
44
44
pathToSources : ' $(Build.SourcesDirectory)'
45
- summaryFileLocation : $(Build.SourcesDirectory)/coverage/*.xml
46
- reportDirectory : $(Build.SourcesDirectory)/coverage
45
+ summaryFileLocation : $(Build.SourcesDirectory)/**/*coverage.xml
47
46
failIfCoverageEmpty : true
48
47
condition : always()
49
48
continueOnError : true
50
- env :
51
- disable.coverage.autogenerate : ' true'
52
49
53
- - task : ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
54
- displayName : ‘Component Detection’
50
+
0 commit comments