forked from monicahq/monica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
83 lines (76 loc) · 2.19 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# 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:
phpVersion: 7.3
COMPOSER_HOME: $(Pipeline.Workspace)/.composer
YARN_CACHE_FOLDER: $(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
- stage: deploy
displayName: 'Deploy'
dependsOn: build
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
jobs:
- job: deployAssets
pool:
vmImage: 'ubuntu-latest'
steps:
- script: make assets
- script: make push_bintray_assets
env:
BINTRAY_USER: $(BINTRAY_USER)
BINTRAY_APIKEY: $(BINTRAY_APIKEY)
- job: deploy_dist
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
pool:
vmImage: 'ubuntu-latest'
steps:
- template: .azure/step-composer-install.yml
parameters:
no_dev: 'true'
- script: make dist
- script: make push_bintray_dist
env:
BINTRAY_USER: $(BINTRAY_USER)
BINTRAY_APIKEY: $(BINTRAY_APIKEY)
- job: deploy_docker_master
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
pool:
vmImage: 'ubuntu-latest'
steps:
- template: .azure/step-prepare-environment.yml
- template: .azure/step-docker-build.yml
- template: .azure/step-docker-push-bintray.yml
- job: deploy_docker
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
pool:
vmImage: 'ubuntu-latest'
steps:
- template: .azure/step-prepare-environment.yml
- template: .azure/step-docker-build.yml
- template: .azure/step-docker-push-bintray.yml
- template: .azure/step-docker-push.yml