-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathazure-pipelines.yaml
50 lines (46 loc) · 1.36 KB
/
azure-pipelines.yaml
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
trigger:
- main
- develop
parameters:
- name: validateOnPhpVersion
type: string
default: 8.2
- name: ShouldDeployApplication
type: boolean
default: false
pool:
vmImage: ubuntu-latest
resources:
repositories:
- repository: Infra
type: git
name: ECOM-EASY-PLUGINS/connect
ref: refs/heads/main
stages:
- stage: Validate
displayName: Validate
jobs:
- job: Validate_Code
steps:
- template: /pipelines/steps/install-php.yaml@Infra
parameters:
phpVersion: ${{ parameters.validateOnPhpVersion }}
- script: |
find ./ -type f -name '*.php' ! -path './vendor/*' -print0 \
| xargs -0 -n 1 php -l | (! grep -Ev '^No syntax errors detected in ')
displayName: 'PHP Syntax Checker (lint)'
- stage: Deploy_Development # This stage success will trigger deployment of CD-Services-Magento2
displayName: Deploy_Development
condition: |
and(
succeeded(),
or(
in(variables['Build.SourceBranch'], 'refs/heads/development'),
and(${{ parameters.ShouldDeployApplication }}, eq(variables['Build.Reason'], 'Manual'))
)
)
jobs:
- job: Trigger_Deploy_Development
steps:
- checkout: none
- bash: echo "CD-Services-Magento2 runs after this completes"