有没有办法在Gitlab CI中配置5个postgresql实例?
这是我的配置:
image: something:latest
variables:
SPRING_PROFILES_ACTIVE: gitlab-ci
POSTGRES_USER: gitlab-ci
POSTGRES_PASSWORD: gitlab-ci
POSTGRES_DB: DATA_V1
LDAP_DOMAIN: domain.com
LDAP_ORGANISATION: org
LDAP_ADMIN_PASSWORD: hello-ci
services:
- name: docker:dind
- name: osixia/openldap:1.1.9
- name: postgres:10.0-alpine
alias: user-management-db
- name: postgres:10.0-alpine
alias: company-management-db
它在CI中产生错误:
[0;m[0KStarting service docker:dind ...
[0;m[0KPulling docker image docker:dind ...
[0;m[0KUsing docker image docker:dind ID=sha256:4998cc824d9ac8e4be3bb89afa004c87911e796cde15f0676d437fcb8a8dd06b for docker service...
[0;m[0KStarting service osixia/openldap:1.1.9 ...
[0;m[0KPulling docker image osixia/openldap:1.1.9 ...
[0;m[0KUsing docker image osixia/openldap:1.1.9 ID=sha256:0670342c5b82a10b014f0cf1060752ccb740cd8bd28a704ac3fa1191a4e31594 for osixia/openldap service...
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
[0;m[0KStarting service postgres:10.0-alpine ...
[0;m[0KPulling docker image postgres:10.0-alpine ...
[0;m[0KUsing docker image postgres:10.0-alpine ID=sha256:0f0ff37589e948e31d9e64bb6c1b31cdbd4d7d0336b656cb6094be568e54ad04 for postgres service...
[0;m[0;33mWARNING: Service postgres:10.0-alpine is already created. Ignoring.
也无法通过variables
单独配置。
到目前为止,我的解决方法是只创建一个具有多个数据库的服务,但始终无法实现。 (例如两个ldap)
有没有人在Gitlab-CI中尝试过这样的配置?
好像它已经在gitlab 9.3 https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/639/pipelines
中修复过了