Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 6.22 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
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
#
# 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:
  OCTAVELIB_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-octavelib/testenv:$CI_COMMIT_REF_NAME
  # this is the image where all the docker containers (server, mysql and test
  # suite) are started
  CI_REGISTRY_IMAGE_BASE: $CI_REGISTRY/caosdb/src/caosdb-pyinttest/base:latest

  # this is the image where the octavelib is installed and where the testsuite runs
  OCTAVEINTTEST_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-octaveinttest/testenv:$CI_COMMIT_REF_NAME
  # this is the name of the image in the /image-cache/ directory
  OCTAVEINTTEST_IMAGE_CACHE: caosdb-ocataveinttest-testenv:$CI_COMMIT_REF_NAME.tar

  ## FOR DEBUGGING
  TRIGGERED_BY_REPO: OCTAVEINTTEST
  TRIGGERED_BY_REF: $CI_COMMIT_REF_NAME
  TRIGGERED_BY_HASH: $CI_COMMIT_SHORT_SHA


  # This is the caosdb-deploy branch which build the images for caosdb-server and caosdb-mysql
  DEPLOY_REF: dev
  DEFAULT_CAOSDB_TAG: dev

stages:
  - info
  - setup
  - build
  - test

info:
  tags: [cached-dind]
  image: docker:20.10
  stage: info
  needs: []
  script:
    - echo "Pipeline triggered by $TRIGGERED_BY_REPO@$TRIGGERED_BY_REF ($TRIGGERED_BY_HASH)"
    - echo "OCTAVELIB_REGISTRY_IMAGE = $OCTAVELIB_REGISTRY_IMAGE"
    - echo "CI_REGISTRY_IMAGE_BASE = $CI_REGISTRY_IMAGE_BASE"
    - echo "OCTAVEINTTEST_REGISTRY_IMAGE = $OCTAVEINTTEST_REGISTRY_IMAGE"
    - echo "OCTAVEINTTEST_IMAGE_CACHE = $OCTAVEINTTEST_IMAGE_CACHE"
    - echo "CAOSDB_TAG = $CAOSDB_TAG"
    - echo "REFTAG = $REFTAG"
    - echo "F_BRANCH = $F_BRANCH"
    - ls -lah /image-cache/


# Build a docker image in which tests for this repository can run
build-testenv: &build-testenv
  tags: [cached-dind]
  image: docker:20.10.6
  stage: setup