Skip to content
Snippets Groups Projects
Verified Commit 681bac64 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

Merge branch 'dev' of gitlab.com:caosdb/caosdb-pyinttest into dev

parents 2b16394f 52e33a25
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,8 @@ RUN apt-get update && \ ...@@ -9,6 +9,8 @@ RUN apt-get update && \
tox \ tox \
-y -y
COPY .docker/wait-for-it.sh /wait-for-it.sh COPY .docker/wait-for-it.sh /wait-for-it.sh
ADD https://gitlab.com/api/v4/projects/13656973/repository/branches/dev \
pylib_version.json
RUN git clone https://gitlab.com/caosdb/caosdb-pylib.git && \ RUN git clone https://gitlab.com/caosdb/caosdb-pylib.git && \
cd caosdb-pylib && pip3 install . cd caosdb-pylib && pip3 install .
COPY . /git COPY . /git
......
# #
# ** header v3.0
# This file is a part of the CaosDB Project. # This file is a part of the CaosDB Project.
# #
# Copyright (C) 2018 Research Group Biomedical Physics, # Copyright (C) 2018 Research Group Biomedical Physics,
...@@ -18,47 +17,15 @@ ...@@ -18,47 +17,15 @@
# #
# You should have received a copy of the GNU Affero General Public License # 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/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ** end header
#
#before_script:
# - apt-get update -qq && apt-get install -y -qq sqlite3 libsqlite3-dev nodejs
# - ruby -v
# - which ruby
# - gem install bundler --no-document
# - bundle install --jobs $(nproc) "${FLAGS[@]}"
#
#rspec:
# script:
# - bundle exec rspec
#
#rubocop:
# script:
# - bundle exec rubocop
#
variables: variables:
CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-pyint-testenv CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-pyint-testenv
# When using dind service we need to instruct docker, to talk with the
# daemon started inside of the service. The daemon is available with
# a network connection instead of the default /var/run/docker.sock socket.
#
# The 'docker' hostname is the alias of the service container as described at
# https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services
#
# Note that if you're using the Kubernetes executor, the variable should be set to
# tcp://localhost:2375/ because of how the Kubernetes executor connects services
# to the job container
# DOCKER_HOST: tcp://localhost:2375/
#
# For non-Kubernetes executors, we use tcp://docker:2375/
DOCKER_HOST: tcp://docker:2375/
# When using dind, it's wise to use the overlayfs driver for # When using dind, it's wise to use the overlayfs driver for
# improved performance. # improved performance.
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
services: services:
- docker:18.09.7-dind - docker:19.03.0-dind
stages: stages:
- setup - setup
...@@ -113,17 +80,15 @@ stages: ...@@ -113,17 +80,15 @@ stages:
# file-system features. # file-system features.
# #
test: test:
tags: [notls] tags: [docker]
stage: test stage: test
image: image: registry.indiscale.com/caosdb-run-base
name: docker/compose:1.24.1
entrypoint: ["/bin/sh", "-c"]
script: script:
- if [[ "$CAOSDB_TAG" == "" ]]; then - if [[ "$CAOSDB_TAG" == "" ]]; then
CAOSDB_TAG=dev-latest; CAOSDB_TAG=dev-latest;
fi fi
- echo $CAOSDB_TAG - echo $CAOSDB_TAG
- KNOWN_TAGS=$(curl -u testuser:$CI_REGISTRY_PASSWORD -X GET https://$CI_REGISTRY:5000/v2/caosdb/tags/list) - KNOWN_TAGS=$(curl -u testuser:$CI_REGISTRY_PASSWORD -X GET https://$CI_REGISTRY/v2/caosdb/tags/list)
- echo $KNOWN_TAGS - echo $KNOWN_TAGS
# test if the caosdb registry knows our current tag # test if the caosdb registry knows our current tag
- echo $KNOWN_TAGS | grep "$CAOSDB_TAG" - echo $KNOWN_TAGS | grep "$CAOSDB_TAG"
...@@ -135,10 +100,11 @@ test: ...@@ -135,10 +100,11 @@ test:
# the pyinttest docker writes the return value of the tests into the # the pyinttest docker writes the return value of the tests into the
# file result # file result
- /bin/sh ./run.sh - /bin/sh ./run.sh
- cd ..
- docker logs docker_caosdb-server_1 &> ../caosdb_log.txt - docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
- docker logs docker_sqldb_1 &> ../mariadb_log.txt - docker logs docker_sqldb_1 &> ../mariadb_log.txt
- docker-compose down - docker-compose -f .docker/docker-compose.yml down
- rc=`cat result` - rc=`cat .docker/result`
- exit $rc - exit $rc
dependencies: [cert] dependencies: [cert]
artifacts: artifacts:
...@@ -152,20 +118,19 @@ build-testenv: ...@@ -152,20 +118,19 @@ build-testenv:
tags: [notls] tags: [notls]
image: docker:18.09 image: docker:18.09
stage: setup stage: setup
only:
- schedules
script: script:
- df -h - df -h
- docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest... # use here general latest or specific branch latest...
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build - docker build
--pull
--file .docker/Dockerfile --file .docker/Dockerfile
--cache-from $CI_REGISTRY_IMAGE:latest
-t $CI_REGISTRY_IMAGE:latest . -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest - docker push $CI_REGISTRY_IMAGE:latest
cert: cert:
tags: [notls] tags: [docker]
stage: cert stage: cert
image: $CI_REGISTRY_IMAGE:latest image: $CI_REGISTRY_IMAGE:latest
artifacts: artifacts:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment