Error on pipeline - Can't figure out (Job Failed: exit code 1)

So, started recently having error on the pipelines, although when running Behat locally, everything would be ok.

$ php vendor/bin/behat --suite=API --format progress
...................................................................... 70
...................................................................... 140
...................................................................... 210
...................................................................... 280
...................................................................... 350
...................................................................... 420
...................................................................... 490
..........................................................ERROR: Job failed: exit code 1

So, I’ve been troubleshooting locally using the gitlab-runner. Thankfully getting the same results.

I’ve executed the script with debug mode on, which gave the following:

$ php vendor/bin/behat --suite=API --format progress
...................................................................... 70
...................................................................... 140
...................................................................... 210
...................................................................... 280
...................................................................... 350
...................................................................... 420
...................................................................... 490
..........................................................Container         500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f finished with exit code 1  job=1 project=0
Executing on /runner--project-0-concurrent-0-build-4 the set -eo pipefail
set +o noclobber
: | eval ''
exit 0
job=1 project=0
Attaching to container 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f ...  job=1 project=0
Starting container 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f ...  job=1 project=0
Waiting for attach to finish 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f ...  job=1 project=0
Waiting for container 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f ...  job=1 project=0
Container 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f finished with <nil>  job=1 project=0
ERROR: Job failed: exit code 1
Removed container 500f435a6c24da0d17accb157ab3d8ac1b5e4e7a15c067261a93af0e1511e78f with <nil>  job=1 project=0
Removed container ea9ef154f8265f3d5cbd3a7688136eaede89ed96b0e64f9749962472be238387 with <nil>  job=1 project=0
Removed container b9546bb5a07cfa5581ecd3e96a3aa1f4232f3aefa32f5df1457daa0477f9a6ba with <nil>  job=1 project=0
Removed container f355ee363ca11fe19e56a5253586dbc88be9f7f0f26eb9b05689abd782990d20 with <nil>  job=1 project=0
Removed container 56881f88b0849035d25d2fb3e9e6879e64c067516d1b03e94c0ae2bff0305c0a with <nil>  job=1 project=0
Removed container 0fcd4d0808e91b5e6bb0e5b74ffe99186997434f7ddd5e0ec6e882d8f2e9551e with <nil>          job=1 project=0
Removed container 2fc912a614bfe5d66c41e5ebabe93bcaef0b2892d98854629e7786823df9f5bc with <nil>  
job=1 project=0

I got it to run if I change the script on my .gitlab-ci.yml from:

- php vendor/bin/behat --suite=API --format progress

to:

- php vendor/bin/behat features/API/labs --format progress
- php vendor/bin/behat features/API/samples --format progress
- php vendor/bin/behat features/API/materials --format progress
- php vendor/bin/behat features/API/plants --format progress
- php vendor/bin/behat features/API/resources --format progress
- php vendor/bin/behat features/API/user --format progress

Which is pretty much the same, but running it by smaller chunks - it is a quick fix tho

Any idea on why I’m getting those errors?