56 строки
1.2 KiB
YAML
56 строки
1.2 KiB
YAML
trigger:
|
|
- main
|
|
|
|
variables:
|
|
- name: major
|
|
value: 0
|
|
- name: minor
|
|
value: 1
|
|
- name: patch
|
|
value: 0
|
|
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
|
|
value: true
|
|
- name: DOTNET_CLI_TELEMETRY_OPTOUT
|
|
value: 1
|
|
|
|
name: $(major).$(minor).$(patch)-$(Rev:r)
|
|
|
|
stages:
|
|
- stage: test
|
|
displayName: Test
|
|
jobs:
|
|
- job: test
|
|
displayName: Test
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
steps:
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET Core SDK 5.0'
|
|
inputs:
|
|
packageType: sdk
|
|
version: 5.0.x
|
|
- task: DotNetCoreCLI@2
|
|
displayName: Unit Test
|
|
inputs:
|
|
command: test
|
|
- stage: Deploy
|
|
displayName: Deploy
|
|
dependsOn: test
|
|
condition:
|
|
not(eq(variables['build.reason'], 'PullRequest'))
|
|
jobs:
|
|
- job: push
|
|
displayName: Push
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
steps:
|
|
- task: Docker@2
|
|
displayName: Build and Push
|
|
inputs:
|
|
command: buildAndPush
|
|
containerRegistry: SteeltoeContainerRegistry
|
|
repository: net-core-tool-service
|
|
tags: |
|
|
$(Build.BuildId)
|
|
latest
|