-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpipeline-orchestrator.yml
113 lines (107 loc) · 6.1 KB
/
pipeline-orchestrator.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
108
109
110
111
112
113
##############################################################################################################################################################################################################################
#
# AzDocs Repository Provisioner (Repoinator) pipeline (without Application Gateway)
#
# Make sure to have the following vars in your pipeline variables:
# CompanyName: Your company name. This will be used to randomize url's to avoid collision with other companies' deployments. Please stick to only alphanumeric characters (no hyphens, spaces or dots etc).
# AzDocsTeamProjectId: Azure DevOps Project ID (GUID) for your AzDocs TeamProject
# AzDocsBuildDefinitionId: The build definition id of your AzDocs build (int)
# AppServicePlanName: The name of the existing app service plan to use for this function app.
# AppServicePlanResourceGroupName: The name of the resourcegroup of the existing app service plan to use for this function app.
# LogAnalyticsWorkspaceResourceGroupName: The name of the resourcegroup of the existing log analytics workspace to use for logging.
# LogAnalyticsWorkspaceName: The name of the existing log analytics workspace to use for logging.
# AzureDevOps.OrganizationName: The organization name of your Azure DevOps instance.
# AzureDevOps.PersonalAccessToken: Your Personal Access Token which has read&write access to the repositories you want to use this provisioner for.
# AzureDevOps.Repository.YamlPipelineFilePath: The path to your pipeline YAML.
# AzureDevOps.Repository.Author.Name: Your displayname to be used in the GIT commit while provisioning the repositories.
# AzureDevOps.Repository.Author.Email: Your e-mailadress to be used in the GIT commit while provisioning the repositories.
# AzureDevOps.Pipeline.BuildAgentQueueName: The buildqueue name. For now we recommend using Hosted Ubuntu 1604 as the value. Other values seem to have bugs. You can override the real buildqueue in your YAML pipeline.
# AzureDevOps.Pipeline.DefaultPipelineNamePostfix: Optional. The pipeline created based on the AzureDevOps.Repository.YamlPipelineFilePath file in the root dir will receive this postfix.
# DeployInfra: true/false. If this is true; the infra will be created and when this is false it will only deploy the software to the existing infra. This is set to false to gain speed during deploying a second or following time.
#
# The following vars can be optional in your pipeline-variable:
# AzDocsBranchName: The name of the AzDocs branch to use by default.
# ResourceTags: The tags you want to apply to the created resources. This has to be in the following format: @('MyTagName=MyTagValue';'MySecondTag=AnotherValue')
#
# If you want to use VNet integration/whitelisting between the resources, you can use the following variables
# EnableVnetIntegrationBetweenResources: true/false; enable or disable the use of VNet integration/VNet whitelisting between resources.
# ApplicationVnetIntegrationSubnetName: The name of the subnet where the functionapp will be "VNet integrated" in.
# ApplicationVnetIntegrationVnetName: The name of the VNet where the functionapp will be "VNet integrated" in.
# ApplicationVnetIntegrationVnetResourceGroupName: The name of the resourcegroup of the VNet where the functionapp will be "VNet integrated" in.
#
# And finally add 3 Service Connections to your Azure DevOps Project to your Azure Subscriptions with the Service Connection Names: "AZDOCSREPOPROVISIONERSUBSCRIPTIONDEV", "AZDOCSREPOPROVISIONERSUBSCRIPTIONACC", "AZDOCSREPOPROVISIONERSUBSCRIPTIONPRD".
# Unfortunately theres a technical limitation in Azure DevOps which prevents us from making this a pipeline variable.
#
##############################################################################################################################################################################################################################
# Template example for the pipeline-orchestrator
parameters:
- name: AzDocsBranchName
type: string
default: $(AzDocsBranchName)
- name: EnvironmentName_Dev
type: string
default: dev
- name: EnvironmentName_Acc
type: string
default: acc
- name: EnvironmentName_Prd
type: string
default: prd
name: $(date:yyyy.MM.dd)$(rev:.r)-$(Build.SourceBranchName)
trigger:
branches:
include:
- main
paths:
exclude:
- pipeline-orchestrator.yml
- pipeline-orchestrator-withgateway.yml
- pipeline-build.yml
- pipeline-release.yml
# it is important to pick a specific version so that you have the possibility to run a version with the exact same version agent.
pool:
vmImage: "ubuntu-20.04"
variables:
# Basic
- name: ProjectName
value: RepositoryProvisioner
# Stage Pool
- name: Stage.Pool
value: "ubuntu-20.04"
stages:
- stage: "Build"
jobs:
- job: Build
displayName: "Build"
steps:
- template: pipeline-build.yml
- stage: "${{ parameters.EnvironmentName_Dev }}"
displayName: "Deploy to ${{ parameters.EnvironmentName_Dev }}"
pool:
vmImage: $(Stage.Pool)
jobs:
- template: pipeline-release.yml
parameters:
SubscriptionName: "AZDOCSREPOPROVISIONERSUBSCRIPTIONDEV"
EnvironmentName: ${{ parameters.EnvironmentName_Dev }}
AzDocsBranchName: ${{ parameters.AzDocsBranchName }}
- stage: "${{ parameters.EnvironmentName_Acc }}"
displayName: "Deploy to ${{ parameters.EnvironmentName_Acc }}"
pool:
vmImage: $(Stage.Pool)
jobs:
- template: pipeline-release.yml
parameters:
SubscriptionName: "AZDOCSREPOPROVISIONERSUBSCRIPTIONACC"
EnvironmentName: ${{ parameters.EnvironmentName_Acc }}
AzDocsBranchName: ${{ parameters.AzDocsBranchName }}
- stage: "${{ parameters.EnvironmentName_Prd }}"
displayName: "Deploy to ${{ parameters.EnvironmentName_Prd }}"
pool:
vmImage: $(Stage.Pool)
jobs:
- template: pipeline-release.yml
parameters:
SubscriptionName: "AZDOCSREPOPROVISIONERSUBSCRIPTIONPRD"
EnvironmentName: ${{ parameters.EnvironmentName_Prd }}
AzDocsBranchName: ${{ parameters.AzDocsBranchName }}