我们已经设法让 Mongo 和 PostgreSql 使用 Gitab 服务正常工作,但是我们面临着 Elasticsearch 的实际问题。
每当我们尝试运行管道时,与弹性的连接都会失败。
我在这个线程中尝试了以下步骤:
https://gitlab.com/gitlab-org/gitlab-ce/issues/42214
但仍然没有运气。
即两者
image: maven:latest
test:
stage: test
services:
- name: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
alias: elasticsearch
command: [ "bin/elasticsearch", "-Ediscovery.type=single-node" ]
stage: test
script:
- ps aux
- ss -plantu
- curl -v "http://elasticsearch:9200/_settings?pretty"
和:
image: maven:latest
test:
stage: test
services:
- elasticsearch:6.5.4
script:
- curl -v "http://127.0.0.1:9200/"
导致连接错误。
有没有人为elasticsearch工作:6.5.4?
最佳答案
这是通过 15 秒的 sleep 线解决的。
ci 文件现在看起来像:
test:
stage: test
services:
- name: docker.elastic.co/elasticsearch/elasticsearch:6.5.4
command: ["bin/elasticsearch", "-Expack.security.enabled=false", "-Ediscovery.type=single-node"]
script:
- echo "Sleeping for 15 seconds.."; sleep 15;
关于elasticsearch - Gitlab Elasticsearch Service 在管道运行期间未连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54426637/