Tooling/azure-pipelines.yml

83 строки
2.3 KiB
YAML
Исходник Обычный вид История

trigger:
- master
2019-09-30 18:53:22 +03:00
- dev
variables:
2019-10-04 20:19:44 +03:00
Solution: 'Tooling'
PackageVersion: $[format('0.5.0-{0}', variables['Build.BuildId'])]
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
2019-10-04 20:19:44 +03:00
- job: 'Linux'
pool:
vmImage: 'Ubuntu-16.04'
steps:
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Build'
inputs:
2019-10-04 20:19:44 +03:00
command: 'build'
projects: '$(Solution).sln'
2019-10-04 20:25:56 +03:00
arguments: '--configuration Release /p:TreatWarningsAsErrors=True'
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Test'
inputs:
2019-10-04 20:19:44 +03:00
command: 'test'
projects: '$(Solution).sln'
2019-10-04 20:21:50 +03:00
- job: 'OSX'
pool:
vmImage: 'macOS-10.14'
steps:
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Build'
inputs:
2019-10-04 20:19:44 +03:00
command: 'build'
projects: '$(Solution).sln'
2019-10-04 20:25:56 +03:00
arguments: '--configuration Release /p:TreatWarningsAsErrors=True'
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Test'
inputs:
2019-10-04 20:19:44 +03:00
command: 'test'
projects: '$(Solution).sln'
- job: 'Windows'
pool:
2019-10-04 20:25:14 +03:00
vmImage: 'Windows-2019'
steps:
- pwsh: |
if ($env:PackageVersionOverride) {
Write-Host "overriding package version: $env:PackageVersion -> $env:PackageVersionOverride"
$env:PackageVersion = $env:PackageVersionOverride
}
env:
PackageVersion: $(PackageVersion)
PackageVersionOverride: $(PackageVersionOverride)
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Build'
inputs:
2019-10-04 18:32:54 +03:00
command: 'pack'
2019-10-04 20:19:44 +03:00
packagesToPack: '$(Solution).sln'
2019-10-04 20:25:56 +03:00
arguments: '--configuration Release /p:TreatWarningsAsErrors=True'
2019-10-04 18:32:54 +03:00
versioningScheme: 'byEnvVar'
versionEnvVar: 'PackageVersion'
2019-10-04 20:19:44 +03:00
- task: 'DotNetCoreCLI@2'
displayName: 'Test'
inputs:
2019-10-04 20:19:44 +03:00
command: 'test'
projects: '$(Solution).sln'
- task: PowerShell@2
displayName: 'Sign'
inputs:
filePath: build/sign-packages.ps1
env:
SignClientUser: $(SignClientUser)
SignClientSecret: $(SignClientSecret)
ArtifactDirectory: $(Build.ArtifactStagingDirectory)
condition: and(succeeded(), not(eq(variables['build.reason'], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
2019-10-04 20:34:22 +03:00
- task: 'PublishBuildArtifacts@1'
displayName: 'Publish'
2019-10-04 20:34:22 +03:00
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'Packages'
publishLocation: 'Container'
condition: 'always()'