According to the documentation I am trying to add drush in gitlab-ci.yml.
This is the top of my gitlab-ci.yml:
image: tetraweb/php:7.1
services:
- drush/drush:8
But apparently the service does not start properly:
Running with gitlab-runner 10.8.0 (079aad9e)
on docker-runner 8a1645e0
Using Docker executor with image teamdesk/toolbox:7.2 ...
Starting service drush/drush:8 ...
Pulling docker image drush/drush:8 ...
Using docker image sha256:646ef48a637011d5bf97ed3021e280d583aa966e63fceea478d9be8dc5ea2902 for drush/drush:8 ...
Waiting for services to be up and running...
*** WARNING: Service runner-8a1645e0-project-35-concurrent-0-drush__drush-0 probably didn't start properly.
Health check error:
exit code 1
Health check container logs:
2019-03-07T16:51:12.703254779Z No HOST or PORT
If I try with the following:
services:
- name: drush/drush:8
command: ["drush", "config-import -y"]
I get:
Running with gitlab-runner 10.8.0 (079aad9e)
on docker-runner e0df35ff
Using Docker executor with image teamdesk/toolbox:7.2 ...
Starting service drush/drush:8 ...
Pulling docker image drush/drush:8 ...
Using docker image sha256:646ef48a637011d5bf97ed3021e280d583aa966e63fceea478d9be8dc5ea2902 for drush/drush:8 ...
Waiting for services to be up and running...
*** WARNING: Service runner-e0df35ff-project-35-concurrent-0-drush__drush-0 probably didn't start properly.
Health check error:
exit code 1
Health check container logs:
2019-03-08T08:37:07.739033180Z No HOST or PORT
Service container logs:
2019-03-08T08:37:07.398595623Z The drush command 'drush config-import -y' could not be found. Run [error]
2019-03-08T08:37:07.398686996Z `drush cache-clear drush` to clear the commandfile cache if you have
2019-03-08T08:37:07.398695300Z installed new extensions.
Since I need to run drush updatedb
and drush config-import
before deploying on the production server, I'd like to use drush as a service in gitlab-ci.yml.