Repository navigation
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
68 lines (59 loc) · 1.79 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
68 lines (59 loc) · 1.79 KB
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
# Instructions: https://aka.ms/yaml
trigger:
- dev
- test
- uat
- stag
- canary
- prod
- master
- main
pool:
vmImage: "ubuntu-latest"
resources:
containers:
- container: taito
image: ${_TEMPLATE_DEFAULT_TAITO_IMAGE}
env:
taito_mode: ci
taito_image: ${_TEMPLATE_DEFAULT_TAITO_IMAGE}
taito_ci_phases: $(TAITO_CI_PHASES)
# TODO: Add branch prefix (e.g. DEV_AZURE_CLIENT_ID)
AZURE_CLIENT_ID: $(AZURE_CLIENT_ID)
AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
jobs:
- job: build
container: taito
steps:
# init
- bash: |
# Azure creates a new user that we need to initialize
/taito-cli-deps/tools/user-init.sh
# TODO: Cancel other ongoing builds for ENV
# - taito deployment cancel:$(Build.SourceBranchName) TODO_CURRENT_BUILD_ID
displayName: init
# prepare
- bash: |
taito build prepare:$(Build.SourceBranchName) $(Build.SourceVersion)
displayName: prepare
env:
VC_TOKEN: $(VC_TOKEN)
# prepare artifacts
- bash: |
taito artifact prepare:wordpress:$(Build.SourceBranchName) $(Build.SourceVersion)
taito wp-plugin-update:$${branch_name} || echo "WARNING: Failed updating wordpress plugins"
displayName: prepare artifacts
# deploy
- bash: |
taito deployment deploy:$(Build.SourceBranchName) $(Build.SourceVersion)
displayName: deploy
# release artifacts
- bash: |
taito artifact release:wordpress:$(Build.SourceBranchName) $(Build.SourceVersion)
displayName: release artifacts
# release
- bash: |
taito build release:$(Build.SourceBranchName)
displayName: release
env:
VC_TOKEN: $(VC_TOKEN)