I need to enable scripting for the elasticsearch service to run my rspec tests
# config/elasticsearch.yml
script.inline: on
script.indexed: on
I try change elasticsearch config inside a docker container the following way in my .gitlab-ci.yml:
rspec:
stage: test
services:
- mysql:5.6.42
- name: elasticsearch:1.6.1
command: ["echo 'script.inline: on' >> /etc/elasticsearch/elasticsearch.yml", "echo 'script.indexed: on' >> /etc/elasticsearch/elasticsearch.yml", "systemctl restart elasticsearch"]
...
But service container startup fails with
*** WARNING: Service runner-6JNFXPMk-project-9870108-concurrent-0-elasticsearch-1 probably didn't start properly.
Health check error:
ContainerStart: Error response from daemon: Cannot link to a non running container: /runner-6LBTXPMk-project-13870108-concurrent-0-elasticsearch-1 AS /runner-6LBTXPMk-project-13870108-concurrent-0-elasticsearch-1-wait-for-service/service (executor_docker.go:1318:0s)
Service container logs:
2018-12-26T11:07:47.604151437Z /docker-entrypoint.sh: line 20: /echo 'script.inline: on' >> /etc/elasticsearch/elasticsearch.yml: No such file or directory
*********
How can I configure elasticsearch service on gitlab CI to enable scripting?