-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
59 lines (50 loc) · 1.59 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
56
57
58
59
trigger:
- main
variables:
azureSubscription: '3fa53317-25c1-4a7c-8a4d-f1ec00ade400'
webAppName: 'fibo-dev-web-app'
vmImageName: 'ubuntu-latest'
workingDirectory: 'Playground/Azure/WebApp/WebApp.API'
buildConfiguration: 'Release'
stages:
- stage: BuildAndDeploy
displayName: Build and Deploy
jobs:
- job: BuildAndDeployJob
displayName: Build and Deploy Job
pool:
vmImage: $(vmImageName)
steps:
- task: UseDotNet@2
displayName: 'Install .NET 8 SDK'
inputs:
packageType: 'sdk'
version: '8.x'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: '$(workingDirectory)/WebApp.API.csproj'
arguments: '--configuration $(buildConfiguration) --force --no-cache'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: 'publish'
projects: '$(workingDirectory)/WebApp.API.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
artifactName: 'package'
pathToPublish: '$(Build.ArtifactStagingDirectory)'
publishLocation: 'Container'
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'package'
downloadPath: '$(System.ArtifactsDirectory)'
- task: AzureWebApp@1
displayName: 'Deploy'
inputs:
azureSubscription: '$(azureSubscription)'
appType: 'webAppLinux'
appName: '$(webAppName)'
package: '$(System.ArtifactsDirectory)/package/**/WebApp.API.zip'