Skip to content
Snippets Groups Projects
Commit 1394cea0 authored by Florian Spreckelsen's avatar Florian Spreckelsen
Browse files

Merge branch 'f-cleanup-ci' into 'dev'

MAINT: comments and minor clean up

See merge request !33
parents cb2cf641 c44a06e4
No related branches found
No related tags found
1 merge request!33MAINT: comments and minor clean up
Pipeline #23271 passed
......@@ -128,17 +128,22 @@ test:
script:
- *env
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- time docker load < /image-cache/caosdb-${REFTAG}.tar || time docker load < /image-cache/caosdb-dev.tar || true
- docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev
- echo $CAOSDB_TAG
- cd .docker
# Store mariadb version
- MARIADBVERSION=$(grep mariadb docker-compose.yml | awk '{print $2}')
- echo "mariadb image:"$MARIADBVERSION
- time docker load < /image-cache/caosdb-pyint-testenv-${CI_COMMIT_REF_NAME}.tar || true
- time docker load < /image-cache/mariadb.tar || true
- time docker load < /image-cache/caosdb-${REFTAG}.tar || time docker load < /image-cache/caosdb-dev.tar || true
- time docker load < /image-cache/$MARIADBVERSION.tar || true
- docker pull $CI_REGISTRY/caosdb/src/caosdb-deploy:$CAOSDB_TAG || CAOSDB_TAG=dev
- docker pull $CI_REGISTRY_IMAGE
- cd .docker
# here the server and the mysql backend docker are being started
# Here, the server and the mysql backend docker are being started
- CAOSDB_TAG=$CAOSDB_TAG docker-compose up -d
# store versions of CaosDB parts
# Store versions of CaosDB parts
- docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_pylib_commit > hash_pylib
- docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_webui_commit > hash_webui
- docker exec -u 0 -t docker_caosdb-server_1 cat /opt/caosdb/git/caosdb_server_commit > hash_server
......@@ -149,16 +154,26 @@ test:
- cat hash_mysql
- cat hash_webui
- cat hash_pylib
# the pyinttest docker writes the return value of the tests into the
# file result
# Run the actual tests. This starts a new docker container within which
# the tests run. The return value is stored in .docker/result
- /bin/sh ./run.sh
# Save logs
- docker logs docker_caosdb-server_1 &> ../caosdb_log.txt
- docker logs docker_sqldb_1 &> ../mariadb_log.txt
- cd ..
# Stop the server
- docker-compose -f .docker/docker-compose.yml down
# Store mariadb image
- if [ ! -f "${MARIADBVERSION}.tar" ]; then
time docker save $MARIADBVERSION > /image-cache/$MARIADBVERSION.tar || true;
fi;
# the pyinttest docker writes the return value of the tests into the
# file result
- rc=`cat .docker/result`
- echo mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}')
- docker save mariadb:$(docker image ls mariadb | grep mariadb | awk '{print $2}') > /image-cache/mariadb.tar || true
- exit $rc
dependencies: [cert]
timeout: 3h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment