-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
66 lines (59 loc) · 2.01 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
60
61
62
63
64
65
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
#
# background on yaml build pipelines versus classic: https://www.reddit.com/r/azuredevops/comments/166el30/stop_dont_use_azure_devops_release_pipelines/
#
# possible speedups: use Linux, and use DotNetCLI instead of VSBUild.
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
stages:
- stage: Build
displayName: Build Stage
jobs:
- job: Build
displayName: Build Stage
steps:
- task: DotNetCoreCLI@2
displayName: restore
inputs:
command: 'restore'
projects: '**/*.sln'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: test
inputs:
command: 'test'
projects: '**/*.sln'
arguments: '--configuration Release' #$(buildConfiguration)
- task: DotNetCoreCLI@2 #https://learn.microsoft.com/en-us/training/modules/create-release-pipeline/5-deploy-to-appservice
displayName: 'package and publish'
inputs:
command: publish
projects: '**/PigLatinBlazor.csproj' #set to the webapp project name
publishWebProjects: false
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(buildConfiguration)'
zipAfterPublish: True
- publish: $(Build.ArtifactStagingDirectory)
artifact: drop
- stage: Deploy_to_Test
displayName: Deploy to Test Stage
jobs:
- job: Deploy
displayName: Deploy Stage
steps:
- download: current
artifact: drop
- task: AzureWebApp@1
inputs:
azureSubscription: 'Azure subscription 1(5b2d29c4-2e1c-4bfc-9da0-f0226643249b)'
appType: 'webApp'
appName: 'PigLatinTesting'
package: '$(Pipeline.Workspace)/drop/$(buildConfiguration)/*.zip'