Refactor logic for external pipeline notifications

Break up the conditionals into separate methods
for better readability
177 jobs for !20364 with 24089-github-integration-sends-status-from-multiple-pipelines-when-using-only-except in 92 minutes and 12 seconds (queued for 8 seconds)
detached
Status Job ID Name Coverage
  Prepare
passed #358377992
docker gitlab-org
build-qa-image

00:05:56

passed #358377988
gitlab-org
compile-assets pull-cache

00:06:37

passed #358377990
gitlab-org
compile-assets pull-cache foss

00:07:36

manual #358377993
gitlab-org allowed to fail manual
manual:review-cleanup
passed #358377995
retrieve-tests-metadata

00:02:00

passed #358377994
gitlab-org
review-stop-failed-deployment

00:00:22

passed #358377991
gitlab-org
setup-test-env

00:06:42

 
  Test
passed #358378019
allowed to fail
code_quality

00:11:06

passed #358378271
gitlab-org
danger-review

00:02:32

passed #358378261
gitlab-org
db:check-schema

00:06:12

passed #358378264
gitlab-org
db:migrate-from-v11.11.0

00:15:00

passed #358378260
gitlab-org
db:migrate:reset

00:03:55

passed #358378266
gitlab-org
db:rollback

00:04:21

passed #358378268
gitlab-org
db:rollback geo

00:05:10

passed #358378021
allowed to fail
dependency_scanning

00:10:21

passed #358378259
gitlab-org
downtime_check

00:05:32

passed #358377998
docker gitlab-org
gitlab:assets:compile pull-cache

00:21:34

passed #358378267
gitlab-org
gitlab:setup

00:04:14

passed #358378274
gitlab-org
gitlab_git_test

00:00:36

passed #358377996
gitlab-org
graphql-reference-verify

00:07:24

passed #358378001
gitlab-org
jest

00:24:51

passed #358378002
gitlab-org
jest-foss

00:22:16

passed #358377999
gitlab-org
karma

00:24:40

66.26%
passed #358476516
gitlab-org
karma-foss

00:12:40

passed #358378276
gitlab-org
lint-ci-gitlab

00:00:27

passed #358378015
gitlab-org
memory-on-boot

00:09:19

passed #358378014
gitlab-org
memory-static

00:04:57

passed #358378006
gitlab-org
qa-frontend-node:10

00:13:50

passed #358378003
gitlab-org
qa-frontend-node:8

00:18:25

passed #358378009
gitlab-org allowed to fail
qa-frontend-node:latest

00:19:26

passed #358378016
gitlab-org
qa:internal

00:05:00

passed #358378017
gitlab-org
qa:selectors

00:02:00

passed #358378018
gitlab-org
qa:selectors-foss

00:05:23

passed #358378256
gitlab-org
rspec fast_spec_helper

00:04:19

passed #358378124
gitlab-org
rspec integration pg9 1/6

00:20:21

passed #358378126
gitlab-org
rspec integration pg9 2/6

00:18:53

passed #358378128
gitlab-org
rspec integration pg9 3/6

00:24:07

passed #358378130
gitlab-org
rspec integration pg9 4/6

00:19:24

passed #358378131
gitlab-org
rspec integration pg9 5/6

00:21:47

passed #358378133
gitlab-org
rspec integration pg9 6/6

00:24:39

passed #358378134
gitlab-org
rspec integration pg9-foss 1/6

00:16:30

passed #358378136
gitlab-org
rspec integration pg9-foss 2/6

00:18:34

passed #358378137
gitlab-org
rspec integration pg9-foss 3/6

00:14:58

passed #358378138
gitlab-org
rspec integration pg9-foss 4/6

00:16:25

passed #358378140
gitlab-org
rspec integration pg9-foss 5/6

00:18:34

passed #358378142
gitlab-org
rspec integration pg9-foss 6/6

00:16:20

passed #358378144
gitlab-org
rspec system pg9 1/24

00:16:15

passed #358378159
gitlab-org
rspec system pg9 10/24

00:17:23

passed #358378162
gitlab-org
rspec system pg9 11/24

00:15:21

passed #358378163
gitlab-org
rspec system pg9 12/24

00:14:56

passed #358378164
gitlab-org
rspec system pg9 13/24

00:14:09

passed #358378165
gitlab-org
rspec system pg9 14/24

00:16:23

passed #358378167
gitlab-org
rspec system pg9 15/24

00:19:45

passed #358378168
gitlab-org
rspec system pg9 16/24

00:17:30

passed #358378169
gitlab-org
rspec system pg9 17/24

00:15:34

passed #358378170
gitlab-org
rspec system pg9 18/24

00:19:26

passed #358378171
gitlab-org
rspec system pg9 19/24

00:18:36

passed #358378147
gitlab-org
rspec system pg9 2/24

00:15:30

passed #358378172
gitlab-org
rspec system pg9 20/24

00:16:23

passed #358378175
gitlab-org
rspec system pg9 21/24

00:21:08

passed #358378176
gitlab-org
rspec system pg9 22/24

00:19:16

passed #358378177
gitlab-org
rspec system pg9 23/24

00:15:05

passed #358378178
gitlab-org
rspec system pg9 24/24

00:14:03

passed #358378149
gitlab-org
rspec system pg9 3/24

00:19:04

passed #358378150
gitlab-org
rspec system pg9 4/24

00:13:54

passed #358378151
gitlab-org
rspec system pg9 5/24

00:17:12

passed #358378152
gitlab-org
rspec system pg9 6/24

00:17:29

passed #358378154
gitlab-org
rspec system pg9 7/24

00:20:10

passed #358378156
gitlab-org
rspec system pg9 8/24

00:17:19

passed #358378157
gitlab-org
rspec system pg9 9/24

00:16:41

passed #358378179
gitlab-org
rspec system pg9-foss 1/24

00:16:09

passed #358378199
gitlab-org
rspec system pg9-foss 10/24

00:17:48

passed #358378200
gitlab-org
rspec system pg9-foss 11/24

00:14:11

passed #358378202
gitlab-org
rspec system pg9-foss 12/24

00:14:04

passed #358378203
gitlab-org
rspec system pg9-foss 13/24

00:14:13

passed #358378205
gitlab-org
rspec system pg9-foss 14/24

00:14:47

passed #358378206
gitlab-org
rspec system pg9-foss 15/24

00:11:31

passed #358378208
gitlab-org
rspec system pg9-foss 16/24

00:12:30

passed #358378210
gitlab-org
rspec system pg9-foss 17/24

00:13:55

passed #358378212
gitlab-org
rspec system pg9-foss 18/24

00:14:27

passed #358378213
gitlab-org
rspec system pg9-foss 19/24

00:12:36

passed #358378180
gitlab-org
rspec system pg9-foss 2/24

00:17:44

passed #358378214
gitlab-org
rspec system pg9-foss 20/24

00:14:42

passed #358378215
gitlab-org
rspec system pg9-foss 21/24

00:18:00

passed #358378216
gitlab-org
rspec system pg9-foss 22/24

00:15:42

passed #358378217
gitlab-org
rspec system pg9-foss 23/24

00:13:33

passed #358378218
gitlab-org
rspec system pg9-foss 24/24

00:16:48

passed #358378181
gitlab-org
rspec system pg9-foss 3/24

00:14:09

passed #358378184
gitlab-org
rspec system pg9-foss 4/24

00:12:08

passed #358378188
gitlab-org
rspec system pg9-foss 5/24

00:15:26

passed #358378191
gitlab-org
rspec system pg9-foss 6/24

00:13:58

passed #358378193
gitlab-org
rspec system pg9-foss 7/24

00:14:15

passed #358378197
gitlab-org
rspec system pg9-foss 8/24

00:14:21

passed #358378198
gitlab-org
rspec system pg9-foss 9/24

00:15:00

passed #358378022
gitlab-org
rspec unit pg9 1/20

00:21:44

passed #358378065
gitlab-org
rspec unit pg9 10/20

00:18:00

passed #358378066
gitlab-org
rspec unit pg9 11/20

00:18:38

passed #358378067
gitlab-org
rspec unit pg9 12/20

00:20:21

passed #358378068
gitlab-org
rspec unit pg9 13/20

00:19:56

passed #358378069
gitlab-org
rspec unit pg9 14/20

00:21:39

passed #358378070
gitlab-org
rspec unit pg9 15/20

00:18:53

passed #358378071
gitlab-org
rspec unit pg9 16/20

00:23:41

passed #358378072
gitlab-org
rspec unit pg9 17/20

00:19:25

passed #358378073
gitlab-org
rspec unit pg9 18/20

00:18:31

passed #358378074
gitlab-org
rspec unit pg9 19/20

00:19:06

passed #358378023
gitlab-org
rspec unit pg9 2/20

00:17:53

passed #358378077
gitlab-org
rspec unit pg9 20/20

00:20:49

passed #358378024
gitlab-org
rspec unit pg9 3/20

00:16:23

passed #358378031
gitlab-org
rspec unit pg9 4/20

00:20:06

passed #358378032
gitlab-org
rspec unit pg9 5/20

00:20:24

passed #358378052
gitlab-org
rspec unit pg9 6/20

00:19:29

passed #358378053
gitlab-org
rspec unit pg9 7/20

00:19:55

passed #358378055
gitlab-org
rspec unit pg9 8/20

00:17:48

passed #358378063
gitlab-org
rspec unit pg9 9/20

00:18:47

passed #358378078
gitlab-org
rspec unit pg9-foss 1/20

00:18:42

passed #358378092
gitlab-org
rspec unit pg9-foss 10/20

00:15:57

passed #358378094
gitlab-org
rspec unit pg9-foss 11/20

00:14:43

passed #358378100
gitlab-org
rspec unit pg9-foss 12/20

00:18:48

passed #358378104
gitlab-org
rspec unit pg9-foss 13/20

00:16:21

passed #358378107
gitlab-org
rspec unit pg9-foss 14/20

00:19:29

passed #358378110
gitlab-org
rspec unit pg9-foss 15/20

00:15:33

passed #358378114
gitlab-org
rspec unit pg9-foss 16/20

00:20:58

passed #358378117
gitlab-org
rspec unit pg9-foss 17/20

00:15:27

passed #358378119
gitlab-org
rspec unit pg9-foss 18/20

00:15:59

passed #358378120
gitlab-org
rspec unit pg9-foss 19/20

00:20:08

passed #358378079
gitlab-org
rspec unit pg9-foss 2/20

00:14:38

passed #358378122
gitlab-org
rspec unit pg9-foss 20/20

00:17:40

passed #358378080
gitlab-org
rspec unit pg9-foss 3/20

00:14:38

passed #358378081
gitlab-org
rspec unit pg9-foss 4/20

00:16:54

passed #358378082
gitlab-org
rspec unit pg9-foss 5/20

00:15:30

passed #358378083
gitlab-org
rspec unit pg9-foss 6/20

00:16:55

passed #358378086
gitlab-org
rspec unit pg9-foss 7/20

00:18:05

passed #358378088
gitlab-org
rspec unit pg9-foss 8/20

00:16:28

passed #358378090
gitlab-org
rspec unit pg9-foss 9/20

00:18:03

passed #358378253
gitlab-org
rspec-ee integration pg10 geo

00:07:06

passed #358378230
gitlab-org
rspec-ee integration pg9 1/3

00:13:38

passed #358378231
gitlab-org
rspec-ee integration pg9 2/3

00:15:03

passed #358378232
gitlab-org
rspec-ee integration pg9 3/3

00:15:41

passed #358378244
gitlab-org
rspec-ee integration pg9 geo

00:10:33

passed #358378255
gitlab-org
rspec-ee system pg10 geo

00:07:25

passed #358378233
gitlab-org
rspec-ee system pg9 1/5

00:18:40

passed #358378234
gitlab-org
rspec-ee system pg9 2/5

00:19:25

passed #358378235
gitlab-org
rspec-ee system pg9 3/5

00:19:44

passed #358378236
gitlab-org
rspec-ee system pg9 4/5

00:15:48

passed #358378237
gitlab-org
rspec-ee system pg9 5/5

00:18:43

passed #358378246
gitlab-org
rspec-ee system pg9 geo

00:10:07

passed #358378249
gitlab-org
rspec-ee unit pg10 geo 1/2

00:16:33

passed #358378251
gitlab-org
rspec-ee unit pg10 geo 2/2

00:17:14

passed #358378220
gitlab-org
rspec-ee unit pg9 1/7

00:17:49

passed #358378222
gitlab-org
rspec-ee unit pg9 2/7

00:14:01

passed #358378223
gitlab-org
rspec-ee unit pg9 3/7

00:16:14

passed #358378224
gitlab-org
rspec-ee unit pg9 4/7

00:18:31

passed #358378225
gitlab-org
rspec-ee unit pg9 5/7

00:18:33

passed #358378227
gitlab-org
rspec-ee unit pg9 6/7

00:20:46

passed #358378229
gitlab-org
rspec-ee unit pg9 7/7

00:19:59

passed #358378238
gitlab-org
rspec-ee unit pg9 geo 1/2

00:11:49

passed #358378240
gitlab-org
rspec-ee unit pg9 geo 2/2

00:15:05

passed #358378020
allowed to fail
sast

00:09:56

passed #358378257
gitlab-org
static-analysis 1/2

00:14:24

passed #358378258
gitlab-org
static-analysis 2/2

00:08:44

passed #358378012
gitlab-org
webpack-dev-server

00:07:46

failed #358378000
gitlab-org
karma-foss

00:07:49

 
  Review Prepare
passed #358378278
gitlab-org
review-build-cng

00:26:34

 
  Review
passed #358378280
gitlab-org allowed to fail
review-deploy

00:06:34

passed #358378283
gitlab-org allowed to fail manual
review-stop

00:00:27

 
  Qa
passed #358378287
allowed to fail
dast

00:10:59

manual #358378285
allowed to fail manual
package-and-qa-manual
passed #358378298
docker gitlab-org allowed to fail
review-performance

00:03:50

manual #358378289
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #358378290
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #358378291
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #358378292
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #358378294
docker gitlab-org allowed to fail manual
review-qa-all 5/5
failed #358378288
docker gitlab-org allowed to fail
review-qa-smoke

00:06:46

 
  Post Test
passed #358378302
gitlab-org
coverage

00:06:35

97.3%
failed #358378307
gitlab-org allowed to fail
flaky-examples-check

00:03:09

manual #358378305
gitlab-org allowed to fail manual
parallel-spec-reports
 
Name Stage Failure
failed
flaky-examples-check Post Test
    "first_flaky_at": "2019-11-22 10:36:00 +0000",
"last_flaky_at": "2019-11-22 10:36:00 +0000",
"last_flaky_job": "https://gitlab.com/gitlab-org/gitlab/-/jobs/358378251"
}
}
Running after script...
$ date
Fri Nov 22 11:50:47 UTC 2019
ERROR: Job failed: exit code 1
failed
review-qa-smoke Qa
Randomized with seed 29005

Running after script...
$ date
Fri Nov 22 11:23:45 UTC 2019
Uploading artifacts...
./qa/gitlab-qa-run-*: found 42 matching files
Uploading artifacts to coordinator... ok
id=358378288 responseStatus=201 Created token=DhYaxVH2
ERROR: Job failed: exit code 1