-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
pipeline.yml
132 lines (124 loc) · 4.39 KB
/
pipeline.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Nodes with values to reuse in the pipeline.
common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/bash-cache#2.6.0
- automattic/git-s3-cache#v1.1.3:
bucket: "a8c-repo-mirrors"
repo: "wordpress-mobile/wordpress-ios/"
# Common environment values to use with the `env` key.
- &common_env
# Remember to address all "FIXIT-13.1" comments when we'll update to new image.
#
# `xcode-13.4.1` note: The issue "FIXIT-13.1" addresses is still there in this image.
# See: https://buildkite.com/automattic/wordpress-ios/builds/8187#01813c28-1c1d-4a25-95c0-0fdd6f2af399
IMAGE_ID: xcode-13.4.1
# This is the default pipeline – it will build and test the app
steps:
#################
# Create Installable Builds for WP and JP
#################
- group: "🛠 Installable Builds"
steps:
- label: "🛠 WordPress Installable Build"
command: ".buildkite/commands/installable-build-wordpress.sh"
env: *common_env
plugins: *common_plugins
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
context: "WordPress Installable Build"
- label: "🛠 Jetpack Installable Build"
command: ".buildkite/commands/installable-build-jetpack.sh"
env: *common_env
plugins: *common_plugins
if: "build.pull_request.id != null || build.pull_request.draft"
notify:
- github_commit_status:
context: "Jetpack Installable Build"
#################
# Build the app
#################
- label: "🛠 Build for Testing"
key: "build"
command: ".buildkite/commands/build-for-testing.sh"
env: *common_env
plugins: *common_plugins
notify:
- github_commit_status:
context: "Build for Testing"
#################
# Run Unit Tests
#################
- label: "🔬 Unit Tests"
command: ".buildkite/commands/run-unit-tests.sh"
depends_on: "build"
env: *common_env
plugins: *common_plugins
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "Unit Tests"
- slack:
channels:
- "#mobile-apps-tests-notif"
if: build.state == "failed"
#################
# UI Tests
#################
- group: "🔬 UI Tests"
steps:
- label: "🔬 UI Tests (iPhone)"
command: .buildkite/commands/run-ui-tests.sh WordPressUITests 'iPhone 13' 15.0
depends_on: "build"
env: *common_env
plugins: *common_plugins
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "UI Tests (iPhone)"
- slack:
channels:
- "#mobile-apps-tests-notif"
if: build.state == "failed"
- label: "🔬 UI Tests (iPad)"
command: .buildkite/commands/run-ui-tests.sh WordPressUITests "iPad Air (5th generation)" 15.0
depends_on: "build"
env: *common_env
plugins: *common_plugins
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "UI Tests (iPad)"
- slack:
channels:
- "#mobile-apps-tests-notif"
if: build.state == "failed"
#################
# Linters
#################
- group: "Linters"
steps:
- label: "🧹 Lint Translations"
command: "gplint /workdir/WordPress/Resources/AppStoreStrings.po"
plugins:
- docker#v3.8.0:
image: "public.ecr.aws/automattic/glotpress-validator:1.0.0"
agents:
queue: "default"
notify:
- github_commit_status:
context: "Lint Translations"
# TODO: This ought to be run on a Docker or Ubuntu agent as there's nothing that requires macOS.
# It's currently in the stock setup because... it was faster to build a proof of concept for it this way;
# I don't know how to pass the `DANGER_GITHUB_API_TOKEN` secret that we need to a Docker agent.
#
# This step uses Danger to run RuboCop, but it's "agnostic" about it.
# That is, it outwardly only mentions RuboCop, not Danger
- label: ":rubocop: Lint Ruby Tooling"
command: .buildkite/commands/rubocop-via-danger.sh
env: *common_env
plugins: *common_plugins