Fix environment automatic on_stop trigger

Due to the nature of pipelines for merge requests, deployments.ref can
be a merge request ref instead of a branch name.

We support the environment auto-stop hook for this case
97 jobs for <span class="ref-name">fix-environment-on-stop-not-work</span> in 108 minutes and 40 seconds (queued for 10 seconds)
Status Job ID Name Coverage
  Build
manual #202240909
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #202240913
docker gitlab-org
build-qa-image

00:05:02

passed #202240910
gitlab-org
compile-assets

00:08:28

passed #202240916
gitlab-org
retrieve-tests-metadata

00:01:03

passed #202240911
gitlab-org
setup-test-env

00:07:22

 
  Test
passed #202240928
allowed to fail
code_quality

00:14:13

passed #202241093
gitlab-org
danger-review

00:03:14

passed #202241064
gitlab-org
db:check-schema-pg

00:03:28

passed #202241062
gitlab-org
db:migrate:reset-mysql

00:06:48

passed #202241060
gitlab-org
db:migrate:reset-pg

00:03:42

passed #202241074
gitlab-org
db:rollback-mysql

00:05:06

passed #202241071
gitlab-org
db:rollback-pg

00:03:28

passed #202240932
allowed to fail
dependency_scanning

00:17:08

passed #202240918
gitlab-org
docs lint

00:02:18

passed #202241055
gitlab-org
downtime_check

00:04:56

passed #202241058
gitlab-org
ee_compat_check

00:04:45

passed #202240919
gitlab-org docker
gitlab:assets:compile

00:17:44

passed #202241079
gitlab-org
gitlab:setup-mysql

00:04:54

passed #202241077
gitlab-org
gitlab:setup-pg

00:04:54

passed #202241095
gitlab-org
gitlab_git_test

00:00:47

passed #202240921
gitlab-org
jest

00:11:40

passed #202240920
gitlab-org
karma

00:13:38

57.52%
passed #202241068
gitlab-org
migration:path-mysql

00:15:42

passed #202241066
gitlab-org
migration:path-pg

00:16:44

passed #202241096
gitlab-org
no_ee_check

00:00:42

manual #202240927
allowed to fail manual
package-and-qa
passed #202240925
gitlab-org
qa-frontend-node:10

00:11:44

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

00:13:20

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

00:12:43

passed #202240922
gitlab-org
qa:internal

00:06:20

passed #202240923
gitlab-org
qa:selectors

00:03:55

passed #202241082
review-build-cng

00:25:22

passed #202241083
gitlab-org allowed to fail
review-deploy

00:27:26

passed #202241088
docker gitlab-org allowed to fail
review-performance

00:29:19

manual #202241087
docker gitlab-org allowed to fail manual
review-qa-all
passed #202241086
docker gitlab-org allowed to fail
review-qa-smoke

00:29:34

manual #202241091
gitlab-org allowed to fail manual
review-stop
passed #202241049
gitlab-org
rspec-fast-spec-helper

00:05:48

passed #202251938
gitlab-org
rspec-pg 1/50

00:17:13

failed #202240946
gitlab-org
rspec-pg 10/50

00:14:05

passed #202240947
gitlab-org
rspec-pg 11/50

00:10:03

passed #202240948
gitlab-org
rspec-pg 12/50

00:12:24

passed #202240949
gitlab-org
rspec-pg 13/50

00:14:03

passed #202240951
gitlab-org
rspec-pg 14/50

00:15:08

passed #202240952
gitlab-org
rspec-pg 15/50

00:11:58

passed #202240956
gitlab-org
rspec-pg 16/50

00:17:56

passed #202240958
gitlab-org
rspec-pg 17/50

00:14:17

passed #202240959
gitlab-org
rspec-pg 18/50

00:16:46

passed #202240960
gitlab-org
rspec-pg 19/50

00:13:10

passed #202240934
gitlab-org
rspec-pg 2/50

00:18:02

passed #202240961
gitlab-org
rspec-pg 20/50

00:12:27

passed #202240967
gitlab-org
rspec-pg 21/50

00:14:15

failed #202240968
gitlab-org
rspec-pg 22/50

01:40:00

passed #202240974
gitlab-org
rspec-pg 23/50

00:13:09

passed #202251980
gitlab-org
rspec-pg 24/50

00:14:03

passed #202240984
gitlab-org
rspec-pg 25/50

00:12:46

passed #202240985
gitlab-org
rspec-pg 26/50

00:14:30

passed #202240987
gitlab-org
rspec-pg 27/50

00:17:06

passed #202240988
gitlab-org
rspec-pg 28/50

00:12:43

passed #202240989
gitlab-org
rspec-pg 29/50

00:12:46

passed #202240935
gitlab-org
rspec-pg 3/50

00:16:17

passed #202240990
gitlab-org
rspec-pg 30/50

00:14:02

passed #202240992
gitlab-org
rspec-pg 31/50

00:14:43

passed #202240993
gitlab-org
rspec-pg 32/50

00:17:08

failed #202240996
gitlab-org
rspec-pg 33/50

00:16:10

passed #202240998
gitlab-org
rspec-pg 34/50

00:15:59

passed #202240999
gitlab-org
rspec-pg 35/50

00:16:06

failed #202241000
gitlab-org
rspec-pg 36/50

00:13:47

passed #202241011
gitlab-org
rspec-pg 37/50

00:13:53

passed #202241013
gitlab-org
rspec-pg 38/50

00:13:39

passed #202241024
gitlab-org
rspec-pg 39/50

00:13:11

passed #202240936
gitlab-org
rspec-pg 4/50

00:15:24

passed #202241026
gitlab-org
rspec-pg 40/50

00:15:18

passed #202241030
gitlab-org
rspec-pg 41/50

00:14:10

passed #202241031
gitlab-org
rspec-pg 42/50

00:12:34

passed #202241032
gitlab-org
rspec-pg 43/50

00:14:50

passed #202241036
gitlab-org
rspec-pg 44/50

00:12:49

passed #202241037
gitlab-org
rspec-pg 45/50

00:14:52

passed #202241038
gitlab-org
rspec-pg 46/50

00:15:37

passed #202241041
gitlab-org
rspec-pg 47/50

00:14:39

passed #202241042
gitlab-org
rspec-pg 48/50

00:14:26

passed #202241044
gitlab-org
rspec-pg 49/50

00:12:26

passed #202240938
gitlab-org
rspec-pg 5/50

00:15:22

passed #202241046
gitlab-org
rspec-pg 50/50

00:15:03

passed #202240941
gitlab-org
rspec-pg 6/50

00:15:19

passed #202240943
gitlab-org
rspec-pg 7/50

00:11:52

passed #202240944
gitlab-org
rspec-pg 8/50

00:13:58

passed #202240945
gitlab-org
rspec-pg 9/50

00:15:28

failed #202240929
allowed to fail
sast

00:34:17

failed #202241053
gitlab-org
static-analysis

00:13:02

failed #202240933
gitlab-org
rspec-pg 1/50

00:05:19

failed #202240981
gitlab-org
rspec-pg 24/50

00:05:21

 
  Post Test
skipped #202241099
gitlab-org
coverage
skipped #202241101
gitlab-org allowed to fail
flaky-examples-check
skipped #202241098
gitlab-org
jsdoc
skipped #202241097
gitlab-org
lint:javascript:report
 
  Post Cleanup
skipped #202241102
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
rspec-pg 22/50 Test The script exceeded the maximum execution time set for the job
RSpec::Retry: 4th try ./spec/features/issuables/markdown_references/jira_spec.rb:47
creates a note on the referenced issues (FAILED - 3)
when both external and internal issues trackers are enabled for the actual project
2nd Try error in ./spec/features/issuables/markdown_references/jira_spec.rb:27:
RSpec::Core::MultipleExceptionError

RSpec::Retry: 2nd try ./spec/features/issuables/markdown_references/jira_spec.rb:27
Pulling docker image gitlab/gitlab-runner-helper:x86_64-1f513601 ...
ERROR: Job failed: execution took longer than 1h40m0s seconds
failed
sast Test
2019/04/25 11:31:22 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2019/04/25 11:31:22 Timeout when running the analyzer
Running after script...
$ date
Thu Apr 25 11:31:35 UTC 2019
Uploading artifacts...
WARNING: gl-sast-report.json: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
rspec-pg 33/50 Test
knapsack/: found 4 matching files                  
rspec_flaky/: found 4 matching files
rspec_profiling/: found 1 matching files
tmp/capybara/: found 9 matching files
Uploading artifacts to coordinator... ok id=202240996 responseStatus=201 Created token=ScNU_peV
Uploading artifacts...
junit_rspec.xml: found 1 matching files
Uploading artifacts to coordinator... ok id=202240996 responseStatus=201 Created token=ScNU_peV
ERROR: Job failed: exit code 1
failed
rspec-pg 10/50 Test
knapsack/: found 4 matching files                  
rspec_flaky/: found 4 matching files
rspec_profiling/: found 1 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=202240946 responseStatus=201 Created token=22N1sxsz
Uploading artifacts...
junit_rspec.xml: found 1 matching files
Uploading artifacts to coordinator... ok id=202240946 responseStatus=201 Created token=22N1sxsz
ERROR: Job failed: exit code 1
failed
rspec-pg 36/50 Test
knapsack/: found 4 matching files                  
rspec_flaky/: found 4 matching files
rspec_profiling/: found 1 matching files
WARNING: tmp/capybara/: no matching files
Uploading artifacts to coordinator... ok id=202241000 responseStatus=201 Created token=EF1_Lo8Z
Uploading artifacts...
junit_rspec.xml: found 1 matching files
Uploading artifacts to coordinator... ok id=202241000 responseStatus=201 Created token=EF1_Lo8Z
ERROR: Job failed: exit code 1
failed
static-analysis Test
spec/workers/merge_requests/environments_cleanup_worker_spec.rb:50:1: C: Layout/TrailingWhitespace: Trailing whitespace detected.

8406 files inspected, 13 offenses detected


Running after script...
$ date
Thu Apr 25 11:10:28 UTC 2019
ERROR: Job failed: exit code 1