-
Notifications
You must be signed in to change notification settings - Fork 25
/
azure-pipelines.yml
44 lines (39 loc) · 1.15 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
trigger:
batch: true
branches:
include:
- refs/heads/feature/*
- refs/heads/hotfix/*
- refs/tags/*
parameters:
- name: variable_group_name
displayName: Variable Group
type: string
default: 'DependencyCheck-AzureDevOps'
pool:
vmImage: 'ubuntu-latest'
variables:
- group: ${{ parameters.variable_group_name }}
- name: CurrentDate
value: $[ format('{0:yyyy}{0:MM}{0:dd}', pipeline.startTime) ]
- name: PublishEnvironment
${{ if startsWith( variables['Build.SourceBranch'], 'refs/tags/' ) }}:
value: 'Release'
${{ elseif startsWith( variables['Build.SourceBranch'], 'refs/heads/feature/' ) }}:
value: 'Development'
${{ elseif startsWith( variables['Build.SourceBranch'], 'refs/heads/hotfix/' ) }}:
value: 'Hotfix'
${{ else }}:
value: 'Development'
stages:
- stage: 'buildStage'
displayName: 'Build'
jobs:
- template: build/pipeline/build_job.yml
- stage: 'publishStage'
dependsOn: 'buildStage'
displayName: 'Publish'
jobs:
- template: build/pipeline/publish_job.yml
parameters:
PublishEnvironment: ${{ variables.PublishEnvironment }}