diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e44cc5cf06e470d73b717202b6e8a9111cc624af..4225ba23ca76861d8a7101ef8ac77a1e3a81def2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,17 @@ # Build and push the Docker image off of merges to master; based off # of Gitlab CI support in https://pythonspeed.com/products/pythoncontainer/ -docker-build: - stage: build - +default: image: # An alpine-based image with the `docker` CLI installed. name: docker:19.03.12 +stages: + - "build" + - "pull db container" + +docker-build: + stage: build + # This will run a Docker daemon in a container (Docker-In-Docker), which will # be available at thedockerhost:2375. If you make e.g. port 5000 public in Docker # (`docker run -p 5000:5000 yourimage`) it will be exposed at thedockerhost:5000. @@ -33,9 +38,16 @@ docker-build: - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY" - docker build -t "$CI_REGISTRY_IMAGE" . - docker push "$CI_REGISTRY_IMAGE" - - docker pull registry.git-ce.rwth-aachen.de/etit/docker-test-images/ms-sql-docker-base:latest - - # Only build off of master branch: only: - main +Pull: + stage: "pull db container" + script: + - | + echo "login into registry.git-ce.rwth-aachen.de/etit/docker-test-images" + echo $CI_BUILD_TOKEN | docker login registry.git-ce.rwth-aachen.de/etit/docker-test-images -u $CI_REGISTRY_USER + echo "downloading scripts" + docker pull registry.git-ce.rwth-aachen.de/etit/docker-test-images/ms-sql-docker-base:latest + # Only build off of master branch: +