-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
83 lines (73 loc) · 2.31 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
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger:
batch: false
branches:
include:
- main
paths:
include:
- "*"
variables:
agentImage: windows-2019
# arm deployment
azureSubscription: RossHopkinsIC
resourceGroupName: RG-ADO-LogStreamer
location: westus2
armTemplate: drop/armTemplates/deploy.json
# function app
functionAppName: adoLogStreamer
azureDevOpsOrg: Hoppy7
azureDevOpsProject: Azure
adoPatKeyvaultSecretUri: https://kv-rohopkin.vault.azure.net/secrets/adoLogStreamerPat/
# storage account
storageAccountName: adologstreamerstg1
storageAccountContainer: pipelinerunlogs
storageAccountQueue: pipelineruns
stages:
- stage: Build
jobs:
- job: Build
workspace:
clean: all
pool:
vmImage: windows-2019
steps:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)
includeRootFolder: false
archiveType: zip
archiveFile: $(Build.ArtifactStagingDirectory)\adoLogStreamer.zip
replaceExistingArchive: true
- task: CopyFiles@2
condition: succeeded()
displayName: Copy Files to ArtifactStagingDirectory
inputs:
sourceFolder: $(Build.SourcesDirectory)
contents: '**'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
condition: succeeded()
displayName: 'Publish Artifact'
- template: templates/functionApp-release.yml
parameters:
environmentName: FunctionAppRelease
agentImage: $(agentImage)
azureSubscription: $(azureSubscription)
resourceGroupName: $(resourceGroupName)
location: $(location)
armTemplate: $(armTemplate)
functionAppName: $(functionAppName)
azureDevOpsOrg: $(azureDevOpsOrg)
azureDevOpsProject: $(azureDevOpsProject)
adoPatKeyvaultSecretUri: $(adoPatKeyvaultSecretUri)
storageAccountName: $(storageAccountName)
storageAccountContainer: $(storageAccountContainer)
storageAccountQueue: $(storageAccountQueue)
deploymentMode: Complete
- template: templates/streamLogs.yml
parameters:
azureSubscription: $(azureSubscription)
storageAccountName: $(storageAccountName)
storageAccountRG: $(resourceGroupName)
storageAccountQueue: $(storageAccountQueue)