Newer
Older
#
# 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-advanced-testenv
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
services:
- time docker load < /image-cache/caosdb-advanced-testenv.tar || true
- time docker load < /image-cache/mariadb.tar || true
- time docker load < /image-cache/caosdb.tar || true
- docker login -u indiscale -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- time docker pull $CI_REGISTRY_IMAGE:latest
- time docker pull mariadb:10.4
- time docker pull $CI_REGISTRY/caosdb:$CAOSDB_TAG
- EXEPATH=`pwd` CAOSDB_TAG=$CAOSDB_TAG docker-compose
-f .docker/docker-compose.yml up -d
- /bin/sh ./run.sh
- docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
- docker logs docker_sqldb_1 &> ../mariadb_log.txt
artifacts:
paths:
- caosdb_log.txt
- mariadb_log.txt
when: on_failure
expire_in: 1 week
- docker login -u indiscale -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest...
- docker build
--file .docker/Dockerfile
-t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
- docker save $CI_REGISTRY_IMAGE:latest > /image-cache/caosdb-advanced-testenv.tar
stage: cert
image: $CI_REGISTRY_IMAGE:latest
artifacts:
paths:
- .docker/cert/
expire_in: 1 week
script:
- cd .docker
- CAOSHOSTNAME=caosdb-server ./cert.sh
stage: style
image: $CI_REGISTRY_IMAGE:latest
script:
- autopep8 -r --diff --exit-code .
allow_failure: true