-
Henrik tom Wörden authoredHenrik tom Wörden authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 2.45 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-pylib/testenv:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
image: $CI_REGISTRY_IMAGE
stages:
- code_style
- linting
- setup
- test
- deploy
# check code style
code_style:
tags: [ docker ]
stage: code_style
script:
- pycodestyle --count ./
allow_failure: true
pylint:
tags: [ docker ]
stage: linting
script:
- pylint3 --unsafe-load-any-extension=y -d all -e E,F src/caosdb/common
allow_failure: true
# pylint tests for pycaosdb
test:
tags: [ docker ]
stage: test
script:
- touch ~/.pycaosdb.ini
- tox -r
# Trigger building of server image and integration tests
trigger_build:
tags: [ docker ]
stage: deploy
script:
- /usr/bin/curl -X POST
-F token=$DEPLOY_TRIGGER_TOKEN
-F "variables[PYLIB]=$CI_COMMIT_REF_NAME"
-F "variables[TriggerdBy]=PYLIB"
-F "variables[TriggerdByHash]=$CI_COMMIT_SHORT_SHA"
-F ref=dev https://gitlab.indiscale.com/api/v4/projects/14/trigger/pipeline