зеркало из https://github.com/microsoft/go-sqlcmd.git
55 строки
2.8 KiB
YAML
55 строки
2.8 KiB
YAML
variables:
|
||
# AZURE_CLIENT_SECRET and SQLPASSWORD must be defined as secret variables in the pipeline.
|
||
# AZURE_TENANT_ID and AZURE_CLIENT_ID are not expected to be secret variables, just regular variables
|
||
AZURECLIENTSECRET: $(AZURE_CLIENT_SECRET)
|
||
PASSWORD: $(SQLPASSWORD)
|
||
pool:
|
||
vmImage: 'ubuntu-latest'
|
||
|
||
steps:
|
||
- template: include-install-go-tools.yml
|
||
|
||
- task: Docker@2
|
||
displayName: 'Run SQL 2017 docker image'
|
||
inputs:
|
||
command: run
|
||
arguments: '-m 2GB -e ACCEPT_EULA=1 -d --name sql2017 -p:1433:1433 -e SA_PASSWORD=$(PASSWORD) mcr.microsoft.com/mssql/server:2017-latest'
|
||
|
||
- template: include-runtests-linux.yml
|
||
parameters:
|
||
RunName: 'SQL2017'
|
||
SQLCMDUSER: sa
|
||
SQLPASSWORD: $(PASSWORD)
|
||
|
||
# The use of client secrets is disallowed now, so commenting out the Azure tests until we can switch to a federated credential.
|
||
# - template: include-runtests-linux.yml
|
||
# parameters:
|
||
# RunName: 'SQLDB'
|
||
# # AZURESERVER must be defined as a variable in the pipeline
|
||
# SQLCMDSERVER: $(AZURESERVER)
|
||
# AZURECLIENTSECRET: $(AZURECLIENTSECRET)
|
||
|
||
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
|
||
displayName: Merge coverage data
|
||
inputs:
|
||
reports: '**/*.coverage.xml"' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
|
||
targetdir: 'coverage' # REQUIRED # The directory where the generated report should be saved.
|
||
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
|
||
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.
|
||
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
|
||
tag: '$(build.buildnumber)_#$(build.buildid)_$(Build.SourceBranchName)' # Optional tag or build version.
|
||
- task: PublishCodeCoverageResults@1
|
||
inputs:
|
||
codeCoverageTool: Cobertura
|
||
pathToSources: '$(Build.SourcesDirectory)'
|
||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/*.xml
|
||
reportDirectory: $(Build.SourcesDirectory)/coverage
|
||
failIfCoverageEmpty: true
|
||
condition: always()
|
||
continueOnError: true
|
||
env:
|
||
disable.coverage.autogenerate: 'true'
|
||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||
displayName: ‘Component Detection’
|