travis-conditions 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +65 -0
- data/Gemfile.lock +1 -1
- data/NOTES.md +107 -0
- data/README.md +261 -13
- data/bin/travis-conditions +34 -0
- data/lib/travis/conditions.rb +10 -16
- data/lib/travis/conditions/v0.rb +30 -0
- data/lib/travis/conditions/v0/data.rb +57 -0
- data/lib/travis/conditions/v0/eval.rb +70 -0
- data/lib/travis/conditions/v0/parser.rb +204 -0
- data/lib/travis/conditions/v1.rb +19 -0
- data/lib/travis/conditions/v1/boolean.rb +71 -0
- data/lib/travis/conditions/v1/data.rb +75 -0
- data/lib/travis/conditions/v1/eval.rb +114 -0
- data/lib/travis/conditions/v1/helper.rb +30 -0
- data/lib/travis/conditions/v1/parser.rb +214 -0
- data/lib/travis/conditions/version.rb +1 -1
- data/spec/conditions_spec.rb +15 -0
- data/spec/v0/conditions_spec.rb +15 -0
- data/spec/{data_spec.rb → v0/data_spec.rb} +6 -1
- data/spec/{eval_spec.rb → v0/eval_spec.rb} +1 -1
- data/spec/v0/fixtures/failures.txt +342 -0
- data/spec/v0/fixtures/passes.txt +1685 -0
- data/spec/{parser_spec.rb → v0/parser_spec.rb} +1 -1
- data/spec/v1/conditions_spec.rb +44 -0
- data/spec/v1/data_spec.rb +30 -0
- data/spec/v1/eval_spec.rb +349 -0
- data/spec/v1/fixtures/failures.txt +336 -0
- data/spec/v1/fixtures/passes.txt +1634 -0
- data/spec/v1/parser/boolean_spec.rb +215 -0
- data/spec/v1/parser/call_spec.rb +68 -0
- data/spec/v1/parser/comma_spec.rb +28 -0
- data/spec/v1/parser/cont_spec.rb +41 -0
- data/spec/v1/parser/eq_spec.rb +16 -0
- data/spec/v1/parser/in_list_spec.rb +60 -0
- data/spec/v1/parser/is_pred_spec.rb +24 -0
- data/spec/v1/parser/list_spec.rb +36 -0
- data/spec/v1/parser/operand_spec.rb +16 -0
- data/spec/v1/parser/parens_spec.rb +28 -0
- data/spec/v1/parser/quoted_spec.rb +24 -0
- data/spec/v1/parser/re_spec.rb +16 -0
- data/spec/v1/parser/regex_spec.rb +12 -0
- data/spec/v1/parser/space_spec.rb +40 -0
- data/spec/v1/parser/term_spec.rb +84 -0
- data/spec/v1/parser/val_spec.rb +24 -0
- data/spec/v1/parser/var_spec.rb +16 -0
- data/spec/v1/parser_spec.rb +486 -0
- data/spec/v1/user_spec.rb +223 -0
- metadata +48 -9
- data/lib/travis/conditions/data.rb +0 -45
- data/lib/travis/conditions/eval.rb +0 -68
- data/lib/travis/conditions/parser.rb +0 -202
@@ -0,0 +1,44 @@
|
|
1
|
+
# notes
|
2
|
+
#
|
3
|
+
# people seem to be confusing `=` (equality) with `IS` (predicate) a lot
|
4
|
+
# reject builds that fail to parse the condition, instead of ignoring it
|
5
|
+
#
|
6
|
+
# docs: change docs to recommend quotes around values in `= "string"`
|
7
|
+
# docs: change docs to recommend quotes around values in `IN ("list")`
|
8
|
+
# docs: mention `=` (equality) and `IS` (predicate) are not the same thing, and `branch IS master` does NOT work
|
9
|
+
# docs: mention NO SHELL CODE PLEASE
|
10
|
+
# docs: mention reqexp limitations, and recommend using `/.../` first
|
11
|
+
# docs: make the warning about `env` only having the .travis.yml vars bigger and fatter
|
12
|
+
|
13
|
+
def each_fixture(name)
|
14
|
+
File.readlines("spec/v1/fixtures/#{name}.txt").each do |str|
|
15
|
+
yield str unless str.strip.empty? || str.strip[0] == '#'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe Travis::Conditions::V1, 'real conditions' do
|
20
|
+
each_fixture(:failures) do |cond|
|
21
|
+
context do
|
22
|
+
let(:subject) { described_class.parse(cond) }
|
23
|
+
it(cond) { expect { subject }.to raise_error(Travis::Conditions::ParseError) }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
each_fixture(:passes) do |cond|
|
28
|
+
context do
|
29
|
+
let(:subject) { described_class.parse(cond) }
|
30
|
+
it(cond) { expect { subject }.to_not raise_error }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context do
|
35
|
+
let(:str) do
|
36
|
+
%(
|
37
|
+
repo = iribeyri/travis-experiments
|
38
|
+
AND type != pull_request
|
39
|
+
AND (branch = master OR tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+.*$)
|
40
|
+
)
|
41
|
+
end
|
42
|
+
it { expect { described_class.parse(str) }.to_not raise_error }
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
describe Travis::Conditions::V1::Data do
|
2
|
+
let(:env) { nil }
|
3
|
+
let(:data) { { branch: 'branch', env: env } }
|
4
|
+
subject { described_class.new(data) }
|
5
|
+
|
6
|
+
it { expect(subject[:branch]).to eq 'branch' }
|
7
|
+
it { expect(subject['branch']).to eq 'branch' }
|
8
|
+
|
9
|
+
describe 'given an env hash' do
|
10
|
+
let(:env) { { foo: 'FOO' } }
|
11
|
+
it { expect(subject.env(:foo)).to eq 'FOO' }
|
12
|
+
it { expect(subject.env('foo')).to eq 'FOO' }
|
13
|
+
end
|
14
|
+
|
15
|
+
describe 'given an env array' do
|
16
|
+
let(:env) { ['foo=FOO'] }
|
17
|
+
it { expect(subject.env(:foo)).to eq 'FOO' }
|
18
|
+
it { expect(subject.env('foo')).to eq 'FOO' }
|
19
|
+
end
|
20
|
+
|
21
|
+
describe 'given a string without an = it raises an ArgumentError' do
|
22
|
+
let(:env) { 'foo' }
|
23
|
+
it { expect { subject }.to raise_error Travis::Conditions::ArgumentError, 'Invalid env data ("foo" given)' }
|
24
|
+
end
|
25
|
+
|
26
|
+
describe 'given an empty string it raises an ArgumentError' do
|
27
|
+
let(:env) { '' }
|
28
|
+
it { expect { subject }.to raise_error Travis::Conditions::ArgumentError, 'Invalid env data ("" given)' }
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,349 @@
|
|
1
|
+
describe Travis::Conditions::V1, 'eval' do
|
2
|
+
let(:tag) { nil }
|
3
|
+
let(:data) { { branch: 'master', tag: tag, env: { foo: 'foo', bar: false } } }
|
4
|
+
subject { described_class.eval(str, data) }
|
5
|
+
|
6
|
+
context do
|
7
|
+
context do
|
8
|
+
let(:str) { '1' }
|
9
|
+
it { should be true }
|
10
|
+
end
|
11
|
+
|
12
|
+
context do
|
13
|
+
let(:str) { '0' }
|
14
|
+
it { should be true }
|
15
|
+
end
|
16
|
+
|
17
|
+
context do
|
18
|
+
let(:str) { '""' }
|
19
|
+
it { should be true }
|
20
|
+
end
|
21
|
+
|
22
|
+
context do
|
23
|
+
let(:str) { 'true' }
|
24
|
+
it { should be true }
|
25
|
+
end
|
26
|
+
|
27
|
+
context do
|
28
|
+
let(:str) { 'TRUE' }
|
29
|
+
it { should be true }
|
30
|
+
end
|
31
|
+
|
32
|
+
context do
|
33
|
+
let(:str) { 'false' }
|
34
|
+
it { should be false }
|
35
|
+
end
|
36
|
+
|
37
|
+
context do
|
38
|
+
let(:str) { 'FALSE' }
|
39
|
+
it { should be false }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe 'expressions' do
|
44
|
+
context do
|
45
|
+
let(:str) { 'NOT branch = foo AND (env(foo) = foo OR tag = wat)' }
|
46
|
+
it { should be true }
|
47
|
+
end
|
48
|
+
|
49
|
+
context do
|
50
|
+
let(:str) { 'NOT branch = foo AND (env(foo) = foo OR tag = wat)' }
|
51
|
+
it { should be true }
|
52
|
+
end
|
53
|
+
|
54
|
+
context do
|
55
|
+
let(:str) { 'branch = foo OR env(foo) = foo AND NOT tag = wat' }
|
56
|
+
it { should be true }
|
57
|
+
end
|
58
|
+
|
59
|
+
context do
|
60
|
+
let(:str) { 'branch = foo OR env(foo) = foo AND tag = wat' }
|
61
|
+
it { should be false }
|
62
|
+
end
|
63
|
+
|
64
|
+
context do
|
65
|
+
let(:str) { 'env(bar) = true' }
|
66
|
+
it { should be false }
|
67
|
+
end
|
68
|
+
|
69
|
+
context do
|
70
|
+
let(:str) { 'concat(foo, -, bar) = foo-bar' }
|
71
|
+
it { should be true }
|
72
|
+
end
|
73
|
+
|
74
|
+
context do
|
75
|
+
let(:str) { 'concat(branch, -, env(foo), -, env(bar)) = master-foo-false' }
|
76
|
+
it { should be true }
|
77
|
+
end
|
78
|
+
|
79
|
+
context do
|
80
|
+
let(:tag) { '0.0.1' }
|
81
|
+
let(:str) { 'tag =~ /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-([\w.-]+))?(?:\+([\w.-]+))?$ AND type IN (push, api)/' }
|
82
|
+
it { should be false }
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe 'eq' do
|
87
|
+
context do
|
88
|
+
let(:str) { '1 = 1' }
|
89
|
+
it { should be true }
|
90
|
+
end
|
91
|
+
|
92
|
+
context do
|
93
|
+
let(:str) { 'true = true' }
|
94
|
+
it { should be true }
|
95
|
+
end
|
96
|
+
|
97
|
+
context do
|
98
|
+
let(:str) { 'branch = master' }
|
99
|
+
it { should be true }
|
100
|
+
end
|
101
|
+
|
102
|
+
context do
|
103
|
+
let(:str) { 'branch = foo' }
|
104
|
+
it { should be false }
|
105
|
+
end
|
106
|
+
|
107
|
+
context do
|
108
|
+
let(:str) { 'env(foo) = foo' }
|
109
|
+
it { should be true }
|
110
|
+
end
|
111
|
+
|
112
|
+
context do
|
113
|
+
let(:str) { 'env(foo) = bar' }
|
114
|
+
it { should be false }
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
describe 'not eq' do
|
119
|
+
context do
|
120
|
+
let(:str) { 'branch != master' }
|
121
|
+
it { should be false }
|
122
|
+
end
|
123
|
+
|
124
|
+
context do
|
125
|
+
let(:str) { 'branch != foo' }
|
126
|
+
it { should be true }
|
127
|
+
end
|
128
|
+
|
129
|
+
context do
|
130
|
+
let(:str) { 'env(foo) != foo' }
|
131
|
+
it { should be false }
|
132
|
+
end
|
133
|
+
|
134
|
+
context do
|
135
|
+
let(:str) { 'env(foo) != bar' }
|
136
|
+
it { should be true }
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
describe 'match' do
|
141
|
+
context do
|
142
|
+
let(:str) { 'branch =~ ^ma.*$' }
|
143
|
+
it { should be true }
|
144
|
+
end
|
145
|
+
|
146
|
+
context do
|
147
|
+
let(:str) { 'branch =~ ^foo.*$' }
|
148
|
+
it { should be false }
|
149
|
+
end
|
150
|
+
|
151
|
+
context do
|
152
|
+
let(:str) { 'env(foo) =~ ^foo.*$' }
|
153
|
+
it { should be true }
|
154
|
+
end
|
155
|
+
|
156
|
+
context do
|
157
|
+
let(:str) { 'env(foo) =~ ^bar.*$' }
|
158
|
+
it { should be false }
|
159
|
+
end
|
160
|
+
|
161
|
+
context do
|
162
|
+
let(:str) { 'env(foo) =~ env(foo)' }
|
163
|
+
it { should be true }
|
164
|
+
end
|
165
|
+
|
166
|
+
context do
|
167
|
+
let(:str) { 'env(foo) =~ concat("^", env(foo), "$")' }
|
168
|
+
it { should be true }
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
describe 'in' do
|
173
|
+
context do
|
174
|
+
let(:str) { 'branch IN (foo, master, bar)' }
|
175
|
+
it { should be true }
|
176
|
+
end
|
177
|
+
|
178
|
+
context do
|
179
|
+
let(:str) { 'branch IN (foo, bar)' }
|
180
|
+
it { should be false }
|
181
|
+
end
|
182
|
+
|
183
|
+
context do
|
184
|
+
let(:str) { 'env(foo) IN (foo, bar, baz)' }
|
185
|
+
it { should be true }
|
186
|
+
end
|
187
|
+
|
188
|
+
context do
|
189
|
+
let(:str) { 'env(foo) IN (bar, baz)' }
|
190
|
+
it { should be false }
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
describe 'not in' do
|
195
|
+
context do
|
196
|
+
let(:str) { 'branch NOT IN (foo, master, bar)' }
|
197
|
+
it { should be false }
|
198
|
+
end
|
199
|
+
|
200
|
+
context do
|
201
|
+
let(:str) { 'branch NOT IN (foo, bar)' }
|
202
|
+
it { should be true }
|
203
|
+
end
|
204
|
+
|
205
|
+
context do
|
206
|
+
let(:str) { 'env(foo) NOT IN (foo, bar, baz)' }
|
207
|
+
it { should be false }
|
208
|
+
end
|
209
|
+
|
210
|
+
context do
|
211
|
+
let(:str) { 'env(foo) NOT IN (bar, baz)' }
|
212
|
+
it { should be true }
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
describe 'is' do
|
217
|
+
context do
|
218
|
+
let(:str) { 'branch IS present' }
|
219
|
+
it { should be true }
|
220
|
+
end
|
221
|
+
|
222
|
+
context do
|
223
|
+
let(:str) { 'tag IS present' }
|
224
|
+
it { should be false }
|
225
|
+
end
|
226
|
+
|
227
|
+
context do
|
228
|
+
let(:str) { 'env(foo) IS present' }
|
229
|
+
it { should be true }
|
230
|
+
end
|
231
|
+
|
232
|
+
context do
|
233
|
+
let(:str) { 'env(bar) IS present' }
|
234
|
+
it { should be false }
|
235
|
+
end
|
236
|
+
|
237
|
+
context do
|
238
|
+
let(:str) { 'env(baz) IS present' }
|
239
|
+
it { should be false }
|
240
|
+
end
|
241
|
+
|
242
|
+
context do
|
243
|
+
let(:str) { 'branch IS blank' }
|
244
|
+
it { should be false }
|
245
|
+
end
|
246
|
+
|
247
|
+
context do
|
248
|
+
let(:str) { 'tag IS blank' }
|
249
|
+
it { should be true }
|
250
|
+
end
|
251
|
+
|
252
|
+
context do
|
253
|
+
let(:str) { 'env(foo) IS blank' }
|
254
|
+
it { should be false }
|
255
|
+
end
|
256
|
+
|
257
|
+
context do
|
258
|
+
let(:str) { 'env(bar) IS blank' }
|
259
|
+
it { should be true }
|
260
|
+
end
|
261
|
+
|
262
|
+
context do
|
263
|
+
let(:str) { 'env(baz) IS blank' }
|
264
|
+
it { should be true }
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
describe 'is not' do
|
269
|
+
context do
|
270
|
+
let(:str) { 'branch IS NOT present' }
|
271
|
+
it { should be false }
|
272
|
+
end
|
273
|
+
|
274
|
+
context do
|
275
|
+
let(:str) { 'tag IS NOT present' }
|
276
|
+
it { should be true }
|
277
|
+
end
|
278
|
+
|
279
|
+
context do
|
280
|
+
let(:str) { 'branch IS NOT blank' }
|
281
|
+
it { should be true }
|
282
|
+
end
|
283
|
+
|
284
|
+
context do
|
285
|
+
let(:str) { 'tag IS NOT blank' }
|
286
|
+
it { should be false }
|
287
|
+
end
|
288
|
+
|
289
|
+
context do
|
290
|
+
let(:str) { 'env(foo) IS NOT present' }
|
291
|
+
it { should be false }
|
292
|
+
end
|
293
|
+
|
294
|
+
context do
|
295
|
+
let(:str) { 'env(bar) IS NOT blank' }
|
296
|
+
it { should be false }
|
297
|
+
end
|
298
|
+
end
|
299
|
+
|
300
|
+
describe 'booleans' do
|
301
|
+
describe 'given a string' do
|
302
|
+
let(:data) { { sudo: 'true' } }
|
303
|
+
|
304
|
+
context do
|
305
|
+
let(:str) { 'sudo = true' }
|
306
|
+
it { should be true }
|
307
|
+
end
|
308
|
+
|
309
|
+
context do
|
310
|
+
let(:str) { 'sudo != false' }
|
311
|
+
it { should be true }
|
312
|
+
end
|
313
|
+
|
314
|
+
context do
|
315
|
+
let(:str) { 'sudo IS true' }
|
316
|
+
it { should be true }
|
317
|
+
end
|
318
|
+
|
319
|
+
context do
|
320
|
+
let(:str) { 'sudo IS NOT false' }
|
321
|
+
it { should be true }
|
322
|
+
end
|
323
|
+
end
|
324
|
+
|
325
|
+
describe 'given a boolean' do
|
326
|
+
let(:data) { { sudo: 'true' } }
|
327
|
+
|
328
|
+
context do
|
329
|
+
let(:str) { 'sudo = true' }
|
330
|
+
it { should be true }
|
331
|
+
end
|
332
|
+
|
333
|
+
context do
|
334
|
+
let(:str) { 'sudo != false' }
|
335
|
+
it { should be true }
|
336
|
+
end
|
337
|
+
|
338
|
+
context do
|
339
|
+
let(:str) { 'sudo IS true' }
|
340
|
+
it { should be true }
|
341
|
+
end
|
342
|
+
|
343
|
+
context do
|
344
|
+
let(:str) { 'sudo IS NOT false' }
|
345
|
+
it { should be true }
|
346
|
+
end
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|
@@ -0,0 +1,336 @@
|
|
1
|
+
# bash code
|
2
|
+
|
3
|
+
$COVERALLS_REPO_TOKEN != '' AND branch =~ ^v[0-9]+\.x\.x$ AND repo = 'sociomantic-tsunami/libdrizzle-redux' AND
|
4
|
+
$COVERALLS_REPO_TOKEN != '' AND branch =~ ^v[0-9]+\.x\.x$ AND repo = 'sociomantic-tsunami/libdrizzle-redux' AND type IS cron
|
5
|
+
$COVERALLS_REPO_TOKEN) != '' AND branch =~ ^v[0-9]+\.x\.x$ AND repo = 'sociomantic-tsunami/libdrizzle-redux'
|
6
|
+
$COVERALLS_REPO_TOKEN) != '' AND branch =~ ^v[0-9]+\.x\.x$ and repo = 'sociomantic-tsunami/libdrizzle-redux'
|
7
|
+
$TRAVIS_BRANCH =~ ^v[0-9]+\.x\.x$ && $TRAVIS_REPO_SLUG = 'sociomantic-tsunami/libdrizzle-redux'
|
8
|
+
$TRAVIS_COMMIT_MESSAGE = *[ci builders]*
|
9
|
+
$TRAVIS_COMMIT_MESSAGE =~ ^((?!\[tests skip\]).)*$
|
10
|
+
$TRAVIS_COMMIT_MESSAGE =~ ^(\[magento tests skip\])
|
11
|
+
$TRAVIS_COMMIT_MESSAGE =~ ^(\[tests skip\])
|
12
|
+
$TRAVIS_COMMIT_MESSAGE =~ ^(\[woocommerce tests skip\])
|
13
|
+
$TRAVIS_OS_NAME = 'linux' && env(DIST_NAME) = 'ubuntu' && env(DIST_VERSION) = 'xenial' && env(COVERALLS_REPO_TOKEN) != ''
|
14
|
+
$TRAVIS_OS_NAME = linux && $DIST_NAME = centos && $DIST_VERSION = 7
|
15
|
+
$TRAVIS_PULL_REQUEST = "false" && $TRAVIS_BRANCH != "rival_stage"
|
16
|
+
$TRAVIS_PULL_REQUEST NOT false
|
17
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/.* && $TRAVIS_PULL_REQUEST
|
18
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/.* && $TRAVIS_PULL_REQUEST == "false"
|
19
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/.* && $TRAVIS_PULL_REQUEST == false
|
20
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/.* && $TRAVIS_PULL_REQUEST == false"
|
21
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/major/.* && "$TRAVIS_PULL_REQUEST" == "false"
|
22
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/major/.* && $TRAVIS_PULL_REQUEST == "false"
|
23
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/major/.* && $TRAVIS_PULL_REQUEST == false
|
24
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/major/.* || "$TRAVIS_PULL_REQUEST" == "false"
|
25
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/minor/.* && $TRAVIS_PULL_REQUEST == "false"
|
26
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/minor/.* && $TRAVIS_PULL_REQUEST == false
|
27
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/minor/.* || $TRAVIS_PULL_REQUEST == false
|
28
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/patch/.* && $TRAVIS_PULL_REQUEST == false
|
29
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/patch/.* || !$TRAVIS_PULL_REQUEST
|
30
|
+
$TRAVIS_PULL_REQUEST_BRANCH =~ ^release/patch/.* || $TRAVIS_PULL_REQUEST == false
|
31
|
+
$TRAVIS_TAG != '' && $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+ && $BINTRAY_USER != '' && $BINTRAY_KEY != ''
|
32
|
+
${tag,,} =~ beta
|
33
|
+
( env($TAG_ENABLE)=True ) AND ( env($BUILD_TYPE) IN (patch, minor, major ) )
|
34
|
+
( env($TAG_ENABLE)=True ) AND ( env($BUILD_TYPE) IN (patch, minor, major ) ) AND branch IN (master, VER3-252_buildProcess)
|
35
|
+
( env($TAG_ENABLE)=True ) AND ( env($BUILD_TYPE) IN (patch, minor, major ) ) AND branch IN (master, VER3-252_buildProcess) AND env($DEPLOY) = True
|
36
|
+
( env($TAG_ENABLE)=True ) AND ( env($BUILD_TYPE) IN (patch, minor, major) )
|
37
|
+
($TRAVIS_BRANCH = "hotfix") OR (($TRAVIS_BRANCH = "master") AND (NOT ($TRAVIS_TAG = NULL OR $TRAVIS_TAG = "")))
|
38
|
+
($TRAVIS_BRANCH = master AND NOT env(RELEASE_ENVIRONMENT) IS present)
|
39
|
+
(($AUTHOR_NAME != 'Travis CI User') AND (branch = travisdeploy))
|
40
|
+
(($TRAVIS_BRANCH = "master") AND (NOT ($TRAVIS_TAG = NULL OR $TRAVIS_TAG = ""))
|
41
|
+
(branch = master) AND NOT (type = pull_request) - k8s/deploy/deploy_to_cluster.sh ${TRAVIS_BUILD_NUMBER} data-eng-apps.k8s.local
|
42
|
+
(branch =~ ^develop/travis/.*) OR ($NOT branch =~ ^develop/.*$)
|
43
|
+
(type IN (pull_request)) OR $LAST_COMMIT_MESSAGE =~ ^toto
|
44
|
+
(type IN (pull_request)) OR ($IS_NEW_VERSION = yes)
|
45
|
+
(type IN (pull_request)) OR ($TRAVIS_COMMIT_MESSAGE = bar)
|
46
|
+
(type IN (pull_request)) OR (branch IS blank AND $LAST_COMMIT_MESSAGE =~ Update application and assets version*)
|
47
|
+
(type IN (pull_request)) OR (branch IS blank AND $LAST_COMMIT_MESSAGE =~ Update*)
|
48
|
+
-z "$TRAVIS_TAG"
|
49
|
+
-z $TRAVIS_TAG || $TRAVIS_TAG =~ ^*-linux$
|
50
|
+
-z '${SLACK_CHANNEL}'
|
51
|
+
branch != $SMOKE_BRANCH
|
52
|
+
branch != ${COVERITY_BRANCH_NAME}
|
53
|
+
branch = master AND $PEPE IS pepo
|
54
|
+
branch = master AND ($PEPE IS pepo)
|
55
|
+
branch = master AND type = push AND $IS_DEPLOYABLE = 1
|
56
|
+
branch =~ ^master AND $TRAVIS_PULL_REQUEST == "false"
|
57
|
+
branch =~ ^master AND $TRAVIS_PULL_REQUEST == 'false'
|
58
|
+
branch =~ ^master AND $TRAVIS_PULL_REQUEST == false
|
59
|
+
branch =~ ^master AND ["$TRAVIS_PULL_REQUEST" = "false"]
|
60
|
+
branch =~ ^master AND [[$TRAVIS_PULL_REQUEST == 'false']]
|
61
|
+
branch =~ ^master$ && $TRAVIS_PULL_REQUEST == "false"
|
62
|
+
branch =~ ^staging*$ && $TRAVIS_PULL_REQUEST == "false"
|
63
|
+
env($TAG_ENABLE)=True
|
64
|
+
env($TRAVIS_OS_NAME) = linux
|
65
|
+
env($TRAVIS_OS_NAME)=linux
|
66
|
+
env($TRAVIS_TAG) =
|
67
|
+
env($TRAVIS_TAG) IS blank
|
68
|
+
env($TRAVIS_TAG) IS present
|
69
|
+
env(FORCE_JOBS) IS blank && (branch = ${MASTER_BRANCH} OR type = pull_request)
|
70
|
+
NOT $TRAVIS_COMMIT_MESSAGE =~ backend
|
71
|
+
tag IS NOT present AND $COVERALLS_REPO_TOKEN != '' AND branch =~ ^v[0-9]+\.x\.x$ AND repo = 'sociomantic-tsunami/libdrizzle-redux'
|
72
|
+
tag IS present && tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+ && $BINTRAY_USER != '' && $BINTRAY_KEY != ''
|
73
|
+
tag IS present AND tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+ $BINTRAY_USER != '' AND $BINTRAY_KEY != ''
|
74
|
+
tag IS present AND tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+ AND
|
75
|
+
tag IS present AND tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+ AND $BINTRAY_USER != '' AND $BINTRAY_KEY != ''
|
76
|
+
test $BUILD_DPDK = 0 AND type != pull_request
|
77
|
+
test $BUILD_DPDK = 0 AND type = pull_request
|
78
|
+
|
79
|
+
# broken parentheses
|
80
|
+
|
81
|
+
((( branch = master OR branch =~ ^rough.$ ) AND ( repo = lifeonairteam/stella ))
|
82
|
+
((NOT (env(FRONTEND_FILES_CHANGED) = "") OR (NOT env(ANY_SERVICES_FILES_CHANGED) = "")) AND (NOT (branch IN (master, alpha, staging, prod)))
|
83
|
+
((branch = travis-try) AND (tag IS present)
|
84
|
+
((sender != 'Travis CI User') AND (branch = travisdeploy)
|
85
|
+
((sender != Travis CI User) AND (branch = travisdeploy))
|
86
|
+
((type IN (api, pull_request, push) AND branch = master)
|
87
|
+
((type IN (api, pull_request, push) AND branch = master) OR (tag =~ ^.+$)
|
88
|
+
(NOT (env(FRONTEND_FILES_CHANGED) = "" OR NOT env(ANY_SERVICES_FILES_CHANGED) = "") AND NOT (branch IN (master, dev))
|
89
|
+
(NOT (env(FRONTEND_FILES_CHANGED) = "" OR NOT env(ANY_SERVICES_FILES_CHANGED) = "") AND NOT branch IN (master, dev)
|
90
|
+
(NOT (repo IS conda-forge/staged-recipes)) OR (type IN (pull_request))
|
91
|
+
(NOT type IN (pull_request) AND ((branch = master) OR (branch =~ ^enterprise-.*))
|
92
|
+
(NOT type IN (pull_request)) AND (branch IS master)
|
93
|
+
(branch NOT IN (staging, develop, master)) AND (tag ~= ^(web|vice))
|
94
|
+
(branch = master) OR (tag =~ ^\d+\.\d+\.\d+$))
|
95
|
+
(type = pull_request AND (NOT branch IN (master)) OR (type = tag AND branch = master AND tag =~ ^v\d+\.\d+$)
|
96
|
+
(type = pull_request AND (NOT branch IN (master)) OR (type = tag AND branch = master AND tag =~ ^v\d+\.\d+\.\d+$)
|
97
|
+
(type = pull_request AND (NOT branch IN (master)) OR (type = tag AND branch = master)
|
98
|
+
NOT (((env(FRONTEND_FILES_CHANGED) IS blank AND env(ANY_SERVICES_FILES_CHANGED) IS blank) AND branch IN (master, alpha, staging, prod))
|
99
|
+
branch IN ("raees/travisFix", master, alpha, staging, prod) AND ((NOT env(FRONTEND_FILES_CHANGED IS blank) OR (NOT env(SENSITIVE_FILES_CHANGED) IS blank))
|
100
|
+
type = push AND (tag =~ ^v8 OR branch IN (master, neon, argon)
|
101
|
+
|
102
|
+
# IS mistaken for = or NOT/IS NOT mistaken for !=
|
103
|
+
|
104
|
+
(branch = dev) AND (type IS cron)
|
105
|
+
(branch = master AND type = push) AND env(PEPE) IS pepo
|
106
|
+
(branch = master AND (type NOT pull_request))
|
107
|
+
(branch = master) AND (env(TRAVIS_TAG) NOT blank)
|
108
|
+
(branch = master) AND (tag NOT blank)
|
109
|
+
(branch = master) AND (tag NOT blank) AND (type IS push)
|
110
|
+
(branch = master) AND (type IS NOT pull_request)
|
111
|
+
(branch = master) AND (type IS push)
|
112
|
+
(branch = master) AND (type NOT pull_request)
|
113
|
+
(branch = master) AND (type NOT pull_request) AND (fork IS false)
|
114
|
+
(branch = master) AND env(TRAVIS_TAG) NOT blank
|
115
|
+
(branch = master) OR (branch =~ release/.*) tag IS present
|
116
|
+
(fork IS (false)) AND (NOT (type IN (pull_request)))
|
117
|
+
(fork IS (true)) OR (type IN (pull_request))
|
118
|
+
(repo IS 2m/sssio) AND (tag =~ ^v)
|
119
|
+
(repo IS conda-forge/staged-recipes) AND (NOT (type IN (pull_request)))
|
120
|
+
(repo IS conda-forge/staged-recipes) OR (type IN (pull_request))
|
121
|
+
(repo NOT conda-forge/staged-recipes) AND (NOT (type IN (pull_request)))
|
122
|
+
(repo NOT conda-forge/staged-recipes) OR (type IN (pull_request))
|
123
|
+
NOT type IS pull_request
|
124
|
+
branch = dev AND type IS cron
|
125
|
+
branch = master AND (env(PEPE) IS pepo)
|
126
|
+
branch = master AND type IS push
|
127
|
+
branch = master AND type IS push AND tag !~ ^v
|
128
|
+
branch = master AND type IS push AND tag NOT blank
|
129
|
+
branch = master AND type NOT pull_request
|
130
|
+
branch = master OR type IS pull-request
|
131
|
+
branch IS master
|
132
|
+
branch IS master AND (env(rebuild-ios) = true OR tag = Rebuild ios)
|
133
|
+
branch IS master AND tag = Rebuild ios
|
134
|
+
branch IS master AND tag IS blank
|
135
|
+
branch IS master AND type NOT api AND tag IS blank
|
136
|
+
branch IS prod
|
137
|
+
branch IS release
|
138
|
+
branch IS unstable - docker-compose build
|
139
|
+
branch is master
|
140
|
+
branch is master and tag is prod
|
141
|
+
env(PEPE) IS pepo
|
142
|
+
env(PRIOR_VERSION) IS "1.00"
|
143
|
+
fork IS (true)
|
144
|
+
repo IS 2m/sssio
|
145
|
+
repo IS conda-forge/staged-recipes
|
146
|
+
repo IS gmr/consulate
|
147
|
+
repo IS gmr/flatdict
|
148
|
+
repo IS gmr/rejected
|
149
|
+
sender IS rit-bikeshare-travis AND tag IS present
|
150
|
+
tag IS present OR type IS api
|
151
|
+
type = push AND env(PEPE) IS pepo
|
152
|
+
type IS NOT pull_request
|
153
|
+
type IS cron
|
154
|
+
type IS cron OR branch IS feat-optimize-travis
|
155
|
+
type IS pull_request
|
156
|
+
type IS push
|
157
|
+
type NOT IS pull_request
|
158
|
+
branch IN (master) AND type NOT pull_request
|
159
|
+
branch NOT master
|
160
|
+
env(GH_TOKEN) NOT present
|
161
|
+
env(SERVICE) NOT "lint"
|
162
|
+
env(TRAVIS_TAG) NOT present
|
163
|
+
head_branch NOT present
|
164
|
+
tag =~ ^v\d+$ AND branch = master AND type NOT pull_request
|
165
|
+
tag NOT blank
|
166
|
+
tag NOT present
|
167
|
+
type NOT (pull_request)
|
168
|
+
type NOT (push, pull_request)
|
169
|
+
type NOT pull_request
|
170
|
+
type NOT pull_request AND branch IN (master)
|
171
|
+
type NOT pull_request AND head_branch =~ ^release.*
|
172
|
+
type is push
|
173
|
+
env(SERVICE) is not lint
|
174
|
+
env(SERVICE) not lint
|
175
|
+
|
176
|
+
# broken boolean, broken expression
|
177
|
+
|
178
|
+
(branch = master AND type = push) or (head_branch = weight-and-kubernetes type = pull_request)
|
179
|
+
AND repo = camptocamp/c2cgeoportal
|
180
|
+
OR branch = auto
|
181
|
+
branch = fix/stage-builds type = push AND tag IS present
|
182
|
+
branch = master NOT type = pull_request
|
183
|
+
branch = release-staging type = push AND tag IS present
|
184
|
+
branch IN (dev, acc, stage, prod) AND
|
185
|
+
branch NOT (IN ("raees/settingsPage", master))
|
186
|
+
branch NOT (IN (master, alpha, staging, prod))
|
187
|
+
branch NOT (IN (raees/settingsPage, master))
|
188
|
+
env(PRE_COMMIT_MESSAGE) =~ build-ios type = push
|
189
|
+
branch=master AND tag=Rebuild ios
|
190
|
+
branch = type IN (pull_request)
|
191
|
+
is deploy tag
|
192
|
+
type branch IN(master)
|
193
|
+
branch = master, /^(?i:epic)/major.*$/, /^(?i:epic)/feature.*$/, /^(?i:epic)/bugfix.*$/
|
194
|
+
branch IN (master, develop, feature/travis_deploy) env(PROJECT_ID) IN (bar1, baz2, gaz3)
|
195
|
+
type = tag IS present
|
196
|
+
master AND ((env(rebuild-android) = true OR tag = Rebuild android) OR (env(rebuild-ios) = true OR tag = Rebuild ios))
|
197
|
+
master AND (env(rebuild-android) = true OR tag = Rebuild android) OR (env(rebuild-ios) = true OR tag = Rebuild ios)
|
198
|
+
env(TRAVIS_TAG) =
|
199
|
+
type = (api OR push) AND branch = master
|
200
|
+
type = (push OR api) AND branch = master
|
201
|
+
env(COVERITY_SCAN_TOKEN) IS present branch = master and head_branch = develop
|
202
|
+
tag IS present OR ( branch = master TRAVIS_EVENT_TYPE != pull_request )
|
203
|
+
|
204
|
+
# equality with parentheses
|
205
|
+
|
206
|
+
(type = (pull_request)) OR NOT (repo = isuruf/staged-recipes)
|
207
|
+
|
208
|
+
# call env.global or env.matrix
|
209
|
+
|
210
|
+
(env.global(TAG_BRANCH) = build-with-stages) AND (env.global(TRAVIS_TAG) != env.global(TAG_BRANCH))
|
211
|
+
(type IN (pull_request)) OR (env.global(LAST_COMMIT_MESSAGE) =~ ^toto$)
|
212
|
+
env.global(TAG_BRANCH) = build-with-stages AND env(TRAVIS_TAG) != ""
|
213
|
+
env.global(TAG_BRANCH) = build-with-stages AND env(TRAVIS_TAG) != build-with-stages
|
214
|
+
env.global(TAG_BRANCH) = build-with-stages AND env(TRAVIS_TAG) =~ \d+
|
215
|
+
env.global(TAG_BRANCH) = build-with-stages AND env(TRAVIS_TAG) IS present
|
216
|
+
env.global(TAG_BRANCH) = build-with-stages AND tag IS present
|
217
|
+
env.matrix(TEST_TYPE) = build
|
218
|
+
env.matrix(TEST_TYPE) IN (small, medium, large)
|
219
|
+
|
220
|
+
# IN missing parentheses
|
221
|
+
|
222
|
+
(type IN pull_request) OR ((type IN (push)) AND branch != develop)
|
223
|
+
(type IN pull_request) OR ((type IN push) AND branch != develop)
|
224
|
+
branch = master AND (type IN pull_request)
|
225
|
+
branch = master AND type IN (push) AND tag IS present AND sender IS rit-bikeshare-travis
|
226
|
+
branch = master AND type NON IN (pull_request)
|
227
|
+
type IN (push) AND (NOT IN (pull_request) OR branch IN (master, development))
|
228
|
+
type IN pull_request
|
229
|
+
type IN pull_request OR ((type IN (push)) AND branch != develop)
|
230
|
+
type IN pull_request OR ((type IN push AND) branch != develop)
|
231
|
+
type IN pull_request OR ((type IN push) AND branch != develop)
|
232
|
+
type IN pull_request OR (type IN push AND branch != develop)
|
233
|
+
type IN push
|
234
|
+
type NOT IN cron
|
235
|
+
type NOT IN pull
|
236
|
+
type NOT IN pull_request
|
237
|
+
branch IN *appstore
|
238
|
+
branch IN *hockeyapp
|
239
|
+
branch IN master AND type = push
|
240
|
+
env(TEST_TYPE) IN build
|
241
|
+
branch =~ ^test- OR type IN pull_request
|
242
|
+
|
243
|
+
# IN missing commas
|
244
|
+
|
245
|
+
type IN (push pull_request)
|
246
|
+
env(TRAVIS_COMMIT_MESSAGE) IN (Replace Conditional)
|
247
|
+
env(TRAVIS_COMMIT_MESSAGE) IN (Replace Conditionalaaa)
|
248
|
+
branch IN (qa, staging production)
|
249
|
+
|
250
|
+
# missing forward slashes around regex
|
251
|
+
|
252
|
+
(type IN (pull_request)) OR env(TRAVIS_COMMIT_MESSAGE) =~ ^Update application and assets version to
|
253
|
+
branch = master OR env(RUN_QA) IS present OR env(TRAVIS_COMMIT_MESSAGE) =~ ^\[test qa\]
|
254
|
+
env(TRAVIS_COMMIT_MESSAGE) != Deploy AdguardTeam/FiltersRegistry to github.com/AdguardTeam/FiltersRegistry.git:test
|
255
|
+
env(TRAVIS_COMMIT_MESSAGE) = Replace a
|
256
|
+
env(TRAVIS_COMMIT_MESSAGE) = Replace conditional
|
257
|
+
env(TRAVIS_COMMIT_MESSAGE) = Replace conditionala
|
258
|
+
env(TRAVIS_COMMIT_MESSAGE) = Replace conditionalasdasdas
|
259
|
+
env(TRAVIS_COMMIT_MESSAGE) = Replace\ a
|
260
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ *\[maven-release-plugin\] prepare release*
|
261
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ \[build pkg.*\]
|
262
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ ^((?!\[build pkg\]).)*$ AND (NOT tag =~ ^(?!$)(?:v[0-9]+\.[0-9]+\.[0-9]+_?[^\W]*)?$)
|
263
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ ^((?!\[tests skip\]).)*$
|
264
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ ^Replace Conditionalaaa$
|
265
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ ^\[test qa\]
|
266
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ expensive tests
|
267
|
+
env(COMMIT_MESSAGE) =~ *\[maven-release-plugin\] prepare release*
|
268
|
+
branch =~ (\bmaster\b|archiidev\/issue#[0-9]+(\/.*)?)
|
269
|
+
branch =~ (\bmaster\b|release\/.*|archiidev\/issue#[0-9]+(\/.*)?)
|
270
|
+
branch =~ (^release$ OR ^release-(\d).(\d).(\d)$)
|
271
|
+
branch =~ (^release.*)|(^master)
|
272
|
+
branch =~ ^(staging_|master)
|
273
|
+
env(TRAVIS_COMMIT_MESSAGE) ~= ^(?!AUTO-CREATED)
|
274
|
+
|
275
|
+
# quoted regex
|
276
|
+
|
277
|
+
NOT env(TRAVIS_COMMIT_MESSAGE) =~ "no docs"
|
278
|
+
env(TRAVIS_COMMIT_MESSAGE) !~ "no docs"
|
279
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ 'expensive tests'
|
280
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ 'expensive testsx'
|
281
|
+
env(TRAVIS_COMMIT_MESSAGE) =~ 'osx tests'
|
282
|
+
sender =~ "Raghu Simha"
|
283
|
+
tag != ^v\d+\.\d+(\.\d+)?(-\S*)?$
|
284
|
+
tag =! ^v
|
285
|
+
type != pull_request and branch ~= ^(v1\.\d\.x|master)
|
286
|
+
|
287
|
+
# use of !=~
|
288
|
+
|
289
|
+
branch != l10n-crowdin AND tag !=~ "-fdroid$"
|
290
|
+
branch != l10n-crowdin AND tag !=~ "-fdroid$" AND tag IS present
|
291
|
+
branch = master or branch !=~ ^renovate/
|
292
|
+
env(TRAVIS_COMMIT_MESSAGE) !=~ backend
|
293
|
+
tag !=~ "-fdroid$"
|
294
|
+
tag IS present AND tag !=~ "-fdroid$"
|
295
|
+
|
296
|
+
# equality with a regex
|
297
|
+
|
298
|
+
branch = ^(master)$
|
299
|
+
branch = ^(preview-(.*)|develop)$
|
300
|
+
branch = ^(preview-(.*)|develop|rc)$
|
301
|
+
branch = ^(rc)$
|
302
|
+
branch = ^(rc|master)$
|
303
|
+
branch = ^preview-(.*)$
|
304
|
+
branch = ^preview-(.*)$ AND type = push
|
305
|
+
|
306
|
+
# equality with parentheses
|
307
|
+
|
308
|
+
type = (pull_request)
|
309
|
+
|
310
|
+
# missing quotes
|
311
|
+
|
312
|
+
sender != Deployment Bot (from Travis CI)
|
313
|
+
|
314
|
+
# missing operator
|
315
|
+
|
316
|
+
branch = development OR type pull_request
|
317
|
+
|
318
|
+
# broken comment
|
319
|
+
|
320
|
+
type = pull_request OR env(PRE_COMMIT_MESSAGE)# =~ build-(android|mobile)
|
321
|
+
type = pull_request OR env(PRE_COMMIT_MESSAGE)# =~ build-web
|
322
|
+
type = push AND env(PRE_COMMIT_MESSAGE)# =~ build-(ios|mobile)
|
323
|
+
type = push AND env(PRE_COMMIT_MESSAGE)# =~ build-ios
|
324
|
+
type = pull_request OR env(PRE_COMMIT_MESSAGE) =~ build-android OR env(PRE_COMMIT_MESSAGE)# =~ build-mobile
|
325
|
+
type = push AND (env(PRE_COMMIT_MESSAGE)# =~ build-ios OR env(PRE_COMMIT_MESSAGE)# =~ build-mobile)
|
326
|
+
|
327
|
+
# typos and weird stuff
|
328
|
+
|
329
|
+
tag IS exist
|
330
|
+
tag IS pesent
|
331
|
+
tag IS presents
|
332
|
+
env(PRIOR_VERSION) != "1.00
|
333
|
+
env(TRAVIS_COMMIT_MESSAGE) -~ "no docs"
|
334
|
+
repo = 'sociomantic-tsunami/libdrizzle-redux' AND branch = =~ ^v[0-9]+\.x\.x$
|
335
|
+
repo = 'sociomantic-tsunami/libdrizzle-redux' AND tag = =~ ^v[0-9]+\.x\.x$
|
336
|
+
|