-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.gitflow.yml
86 lines (79 loc) · 2.67 KB
/
default.gitflow.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
parameters:
- name: staging_tag
stages:
- stage: PrepareApplication
displayName: 'Prepare Application'
jobs:
- template: jobs/common/job.check_build_version.gitflow.template.yml
parameters:
staging_tag: ${{ parameters.staging_tag }}
- template: jobs/common/job.build_application.template.yml
- template: jobs/common/job.run_unit_tests.template.yml
- template: jobs/common/job.run_sonarqube.template.yml
- template: jobs/common/job.publish_docker_image.template.yml
- template: jobs/common/job.pack_nuget.template.yml
# Deploy Staging
- stage: DeployStaging
displayName: 'Deploy - Staging'
dependsOn: PrepareApplication
condition: |
and
(
succeeded('PrepareApplication'),
not(eq(variables['Build.SourceBranchName'], 'master')),
not(eq(variables['Build.SourceBranchName'], 'main')),
not(eq(variables['Build.SourceBranchName'], 'develop')),
eq(dependencies.PrepareApplication.outputs['CheckBuildVersion.UpdateBuildVersionNumberTask.DeployType'], 'staging'),
or
(
eq(variables['ExecuteDockerPublish'], 'true'),
eq(variables['ExecuteSdkPublish'], 'true'),
eq(variables['ExecuteIntegrationTests'], 'true')
)
)
variables:
- template: 'devops/variables.staging.yml@self'
jobs:
- template: jobs/staging/job.deploy_rancher.template.yml
- template: jobs/staging/job.publish_nuget_package.template.yml
- template: jobs/staging/job.run_integration_tests.template.yml
# Deploy Approval
- stage: DeployApproval
displayName: 'Approval'
dependsOn: PrepareApplication
condition: |
and
(
succeeded('PrepareApplication'),
eq(dependencies.PrepareApplication.outputs['CheckBuildVersion.UpdateBuildVersionNumberTask.DeployType'], 'production'),
or
(
eq(variables['ExecuteDockerPublish'], 'true'),
eq(variables['ExecuteSdkPublish'], 'true')
)
)
jobs:
- template: jobs/production/job.product_approval.template.yml
- template: jobs/production/job.tech_approval.template.yml
# Deploy Production
- stage: DeployProduction
displayName: 'Deploy - Production'
dependsOn:
- PrepareApplication
- DeployApproval
condition: |
and
(
succeeded('DeployApproval'),
eq(dependencies.PrepareApplication.outputs['CheckBuildVersion.UpdateBuildVersionNumberTask.DeployType'], 'production'),
or
(
eq(variables['ExecuteDockerPublish'], 'true'),
eq(variables['ExecuteSdkPublish'], 'true')
)
)
variables:
- template: 'devops/variables.production.yml@self'
jobs:
- template: jobs/production/job.deploy_rancher.template.yml
- template: jobs/production/job.publish_nuget_package.template.yml