forked from monicahq/monica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
60 lines (55 loc) · 1.62 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
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
trigger:
batch: true
branches:
include:
- master
tags:
include:
- '*'
pr:
autoCancel: true
branches:
include:
- '*'
variables:
- group: Monica
- name: phpVersion
value: 7.3
- name: COMPOSER_HOME
value: $(Pipeline.Workspace)/.composer
- name: YARN_CACHE_FOLDER
value: $(Pipeline.Workspace)/.yarn
stages:
- stage: build
displayName: Build
condition: not(startsWith(variables['System.PullRequest.SourceBranch'], 'l10n_master'))
jobs:
- template: .azure/job-build.yml
- template: .azure/job-tests.yml
- template: .azure/job-analyzers.yml
- template: .azure/job-test-browser.yml
- template: .azure/job-reporting.yml
- template: .azure/job-test-migrations.yml
- ${{ if and(in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) }}:
- stage: deploy
displayName: Deploy
dependsOn: build
jobs:
- deployment: deploy_dist
pool:
vmImage: 'ubuntu-latest'
environment: monica
strategy:
runOnce:
deploy:
steps:
- download: none
- checkout: self
- template: .azure/step-composer-install.yml
parameters:
no_dev: true
- template: .azure/step-deploy-dist.yml