NetCoreToolService/azure-pipelines.yaml

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

2021-06-15 19:38:03 +03:00
trigger:
- main
variables:
- name: major
value: 0
- name: minor
value: 1
2021-09-01 15:14:34 +03:00
- name: patch
value: 0
2021-06-15 19:38:03 +03:00
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_CLI_TELEMETRY_OPTOUT
value: 1
name: $(major).$(minor).$(patch)-$(Rev:r)
stages:
2021-09-21 15:24:13 +03:00
- stage: test
displayName: Test
2021-06-15 19:38:03 +03:00
jobs:
2021-09-21 15:41:46 +03:00
- job: test
displayName: Test
2021-06-15 19:38:03 +03:00
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
2021-09-21 15:46:32 +03:00
displayName: Unit Test
2021-06-15 19:38:03 +03:00
inputs:
command: test
2021-09-21 15:37:14 +03:00
- stage: Deploy
displayName: Deploy
2021-09-21 15:41:46 +03:00
dependsOn: test
2021-09-21 15:37:14 +03:00
condition:
not(eq(variables['build.reason'], 'PullRequest'))
jobs:
2021-09-21 15:41:46 +03:00
- job: push
displayName: Push
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
2021-09-21 15:46:32 +03:00
displayName: Build and Push
2021-09-21 15:41:46 +03:00
inputs:
command: buildAndPush
containerRegistry: SteeltoeContainerRegistry
repository: net-core-tool-service
tags: |
$(Build.BuildId)
latest