2019-09-30 18:22:48 +03:00
|
|
|
trigger:
|
|
|
|
- master
|
2019-09-30 18:53:22 +03:00
|
|
|
- dev
|
2019-09-30 18:22:48 +03:00
|
|
|
|
|
|
|
variables:
|
2019-10-04 20:19:44 +03:00
|
|
|
Solution: 'Tooling'
|
|
|
|
PackageVersion: $[format('0.5.0-{0}', variables['Build.BuildId'])]
|
2019-09-30 18:22:48 +03:00
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
|
|
|
|
jobs:
|
2019-10-04 20:19:44 +03:00
|
|
|
- job: 'Linux'
|
2019-09-30 18:22:48 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'Ubuntu-16.04'
|
|
|
|
steps:
|
2019-10-04 20:19:44 +03:00
|
|
|
- task: 'DotNetCoreCLI@2'
|
|
|
|
displayName: 'Build'
|
2019-09-30 18:22:48 +03:00
|
|
|
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'
|
2019-09-30 18:22:48 +03:00
|
|
|
inputs:
|
2019-10-04 20:19:44 +03:00
|
|
|
command: 'test'
|
|
|
|
projects: '$(Solution).sln'
|
2019-10-04 20:21:50 +03:00
|
|
|
- job: 'OSX'
|
2019-09-30 18:22:48 +03:00
|
|
|
pool:
|
|
|
|
vmImage: 'macOS-10.14'
|
|
|
|
steps:
|
2019-10-04 20:19:44 +03:00
|
|
|
- task: 'DotNetCoreCLI@2'
|
|
|
|
displayName: 'Build'
|
2019-09-30 18:22:48 +03:00
|
|
|
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'
|
2019-09-30 18:22:48 +03:00
|
|
|
inputs:
|
2019-10-04 20:19:44 +03:00
|
|
|
command: 'test'
|
|
|
|
projects: '$(Solution).sln'
|
|
|
|
- job: 'Windows'
|
2019-09-30 18:22:48 +03:00
|
|
|
pool:
|
2019-10-04 20:25:14 +03:00
|
|
|
vmImage: 'Windows-2019'
|
2019-09-30 18:22:48 +03:00
|
|
|
steps:
|
2019-10-10 22:47:41 +03:00
|
|
|
- pwsh: |
|
|
|
|
if ($env:PackageVersionOverride) {
|
|
|
|
Write-Host "overriding package version: $env:PackageVersion -> $env:PackageVersionOverride"
|
|
|
|
$env:PackageVersion = $env:PackageVersionOverride
|
|
|
|
}
|
|
|
|
env:
|
|
|
|
PackageVersion: $(PackageVersion)
|
|
|
|
PackageVersionOverride: $(PackageVersionOverride)
|
2019-10-10 23:27:41 +03:00
|
|
|
displayName: 'Version'
|
2019-10-04 20:19:44 +03:00
|
|
|
- task: 'DotNetCoreCLI@2'
|
2019-10-10 22:38:11 +03:00
|
|
|
displayName: 'Build'
|
2019-09-30 18:22:48 +03:00
|
|
|
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'
|
2019-09-30 18:22:48 +03:00
|
|
|
inputs:
|
2019-10-04 20:19:44 +03:00
|
|
|
command: 'test'
|
|
|
|
projects: '$(Solution).sln'
|
2019-10-10 22:38:11 +03:00
|
|
|
- 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'
|
2019-10-10 22:38:11 +03:00
|
|
|
displayName: 'Publish'
|
2019-10-04 20:34:22 +03:00
|
|
|
inputs:
|
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
ArtifactName: 'Packages'
|
|
|
|
publishLocation: 'Container'
|
|
|
|
condition: 'always()'
|