-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
107 lines (95 loc) · 3.1 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
branches:
include:
- develop
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
Major: '0'
Minor: '0'
Patch: '1'
workingDir: "src/BxBlazor"
steps:
- task: NuGetToolInstaller@1
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
projects: 'src/**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: 'src/Nuget.config'
includeNuGetOrg: true
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
projects: 'src/**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
packagesToPack: 'src/BxBlazor/**/*.csproj'
command: pack
versioningScheme: byPrereleaseNumber
majorVersion: '$(Major)'
minorVersion: '$(Minor)'
patchVersion: '$(Patch)'
- task: DotNetCoreCLI@2
displayName: 'Nuget push to BxBlazor feed'
inputs:
workingDirectory: '$(workingDir)'
command: push
publishVstsFeed: '000f425a-ccb5-4b06-8458-0a352978d151/84a32888-ceea-438a-b74b-ea0998a1d69b'
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'nuget.org'
- task: DotNetCoreCLI@2
inputs:
command: publish
arguments: '--configuration Release --output publish_output'
projects: 'src/BackendApi/*.csproj'
publishWebProjects: false
modifyOutputPath: true
zipAfterPublish: false
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output/BackendApi"
includeRootFolder: false
archiveFile: "$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(System.DefaultWorkingDirectory)/build$(Build.BuildId).zip'
ArtifactName: 'drop'
- task: AzureFunctionApp@1
displayName: 'publish to azure functions app'
inputs:
azureSubscription: 'Visual Studio Enterprise Subscription(c88875e6-420c-4b77-81f5-f3a23368e07a)'
appType: 'functionApp'
appName: 'backend-challenge'
deploymentMethod: 'auto'
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: publish
publishWebProjects: false
projects: 'src/SampleProject/Client/*.csproj'
arguments: '-o $(Build.ArtifactStagingDirectory)/dist'
zipAfterPublish: false
modifyOutputPath: true
- task: AzureCLI@2
inputs:
azureSubscription: 'Visual Studio Enterprise Subscription(c88875e6-420c-4b77-81f5-f3a23368e07a)'
scriptType: 'pscore'
scriptLocation: 'inlineScript'
inlineScript: 'az storage blob upload-batch --account-name bxblazor --destination ‘$web’ --source ./'
workingDirectory: '$(Build.ArtifactStagingDirectory)/dist/Client/blazorwasm.Client/dist'