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
。
これまでのところ、私の回避策は、常に可能とは限らない複数のデータベースを持つサービスを 1 つだけ作成することでした。(たとえば 2 つの LDAP)
Gitlab-CI でそのような構成を試した人はいますか?
gitlab 9.3 https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/639/pipelinesで修復されたようです