Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 6.62 KiB
#
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2018 Research Group Biomedical Physics,
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen
# Copyright (C) 2019 Henrik tom Wörden 
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

variables:
   CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/caosdb-pyinttest/testenv:latest
   CI_REGISTRY_IMAGE_BASE: $CI_REGISTRY/caosdb/caosdb-pyinttest/base:latest

stages:
  - setup
  - cert
  - style
  - test


# During the test stage the CI pipeline (which runs in a "root" docker) starts
# two docker container with docker-compose (one for the caosdb-server, another
# for the mysql-backend). Then a third docker is being started which contains
# the pyintest suite and executes it.
#
# +-------------(root docker)-------------------------+
# |                                                   |
# |             +-(caosdb_mysqlbackend)-------------+ |
# |             |                                   | |
# |             +-----------------------------------+ |
# |             +-(caosdb-server)-------------------+ |
# |             |                                   | |
# |             | /opt/caosdb                       | |
# |       .---->|  + /git/caosdb-server/scripting/  | |
# |      | .--->|  + /mnt/extroot                   | |
# |      | | .->|  + /cert                          | |
# |      | | |  |                                   | |
# |      | | |  +-----------------------------------+ |
# |      | | |                                        |
# |      | | |  filesystem:                           |
# |      | | *-    /cert -----------.                 |
# |      | |                        |                 |
# |      | |    volumes:            |                 |
# |      .  *--    extroot  ------. |                 |
# |       *----    scripting  --. | |                 |
# |                             | | |                 |
# | +-(caosdb-pyinttest)---+    | | |                 |
# | |                      |    | | |                 |
# | | /scripting           |<---* | |                 |
# | | /extroot             |<----*  .                 |
# | | /cert                |<------*                  |
# | |                      |                          |
# | +----------------------+                          |
# +---------------------------------------------------+
#
# In the root docker, the directory /cert is mounted to .docker/cert relative
# to this repository. The directory is created during the cert stage of this
# pipeline and a certificate is created in there. The certificat is then
# available in mounted directories in the server and pyinttest containers.