Skip to content
Snippets Groups Projects
Commit e751a60a authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

Merge branch 'test' into 'dev'

ENH: use cached docker image building

See merge request caosdb/caosdb-pyinttest!21
parents 7314084d 5892b4fa
Branches
Tags
No related merge requests found
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
variables: variables:
CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-pyint-testenv CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb-pyint-testenv
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
DOCKER_DRIVER: overlay2
services:
- docker:19.03.0-dind
stages: stages:
- setup - setup
...@@ -79,6 +73,9 @@ stages: ...@@ -79,6 +73,9 @@ stages:
# These volumes are inteded to be used for testing server-side scripting and # These volumes are inteded to be used for testing server-side scripting and
# file-system features. # file-system features.
# #
services:
- docker:19.03.0-dind
test: test:
tags: [docker] tags: [docker]
stage: test stage: test
...@@ -88,11 +85,11 @@ test: ...@@ -88,11 +85,11 @@ test:
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/v2/caosdb/tags/list) - KNOWN_TAGS=$(curl -u indiscale:$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"
- docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u indiscale -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CI_REGISTRY_IMAGE:latest - docker pull $CI_REGISTRY_IMAGE:latest
- cd .docker - cd .docker
# here the server and the mysql backend docker are being started # here the server and the mysql backend docker are being started
...@@ -115,14 +112,14 @@ test: ...@@ -115,14 +112,14 @@ test:
expire_in: 1 week expire_in: 1 week
build-testenv: build-testenv:
tags: [notls] tags: [cached-dind]
image: docker:18.09 image: docker:19.03
stage: setup stage: setup
only: only:
- schedules - schedules
script: script:
- df -h - df -h
- docker login -u testuser -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u indiscale -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# use here general latest or specific branch latest... # use here general latest or specific branch latest...
- docker build - docker build
--file .docker/Dockerfile --file .docker/Dockerfile
...@@ -141,7 +138,7 @@ cert: ...@@ -141,7 +138,7 @@ cert:
- cd .docker - cd .docker
- CAOSHOSTNAME=caosdb-server ./cert.sh - CAOSHOSTNAME=caosdb-server ./cert.sh
style: style:
tags: [notls] tags: [docker]
stage: style stage: style
image: $CI_REGISTRY_IMAGE:latest image: $CI_REGISTRY_IMAGE:latest
script: script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment