This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
executable file
·55 lines (51 loc) · 2.07 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
trigger:
branches:
include:
- '*'
variables:
buildConfiguration: 'Release'
pool:
vmImage: 'ubuntu-latest'
stages:
- stage: build
displayName: 'Build & Test API'
jobs:
- job: 'api_build_and_test'
displayName: 'Build & Test API'
steps:
- template: Pipelines/Api/Templates/build-test.yml
parameters:
buildConfiguration: $(buildConfiguration)
projectsFilter: '**/*.csproj'
publishArtifactFilter: '**/*.csproj'
testProjectsFilter: '**/*Tests.csproj'
runImplementationTests: 'true'
runUnitTests: 'true'
runIntegrationTests: ${{ or(contains(variables['system.pullRequest.targetBranch'], 'development'), contains(variables['system.pullRequest.targetBranch'], 'main'), contains(variables['build.sourceBranch'], 'development'), contains(variables['build.sourceBranch'], 'main')) }}
runSmokeTests: ${{ or(contains(variables['system.pullRequest.targetBranch'], 'main'), contains(variables['build.sourceBranch'], 'main')) }}
publishArtifact: ${{ or(contains(variables['build.sourceBranch'], 'development'), contains(variables['build.sourceBranch'], 'main')) }}
- stage: deploy_dev
dependsOn: build
condition: and(succeeded(), contains(variables['build.sourceBranch'], 'development'))
displayName: 'Deploy API'
jobs:
- job: deploy
displayName: 'Deploy API'
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download Artifacts'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'drop'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzureRmWebAppDeployment@4
displayName: 'Deploy API'
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'sc-zoo-dev'
appType: 'webApp'
WebAppName: 'app-zoo-dev'
ResourceGroupName: 'rg-zoo-dev'
StartupCommand: 'dotnet AspNetCore.dll'
packageForLinux: '$(System.ArtifactsDirectory)/drop/AspNetCore.zip'