Skip to content
Snippets Groups Projects
Commit c0f98471 authored by Langer, Jacek's avatar Langer, Jacek
Browse files

Update .gitlab-ci.yml file

parent 8866c7cf
No related branches found
No related tags found
No related merge requests found
Pipeline #148288 failed
# Build and push the Docker image off of merges to master; based off # Build and push the Docker image off of merges to master; based off
# of Gitlab CI support in https://pythonspeed.com/products/pythoncontainer/ # of Gitlab CI support in https://pythonspeed.com/products/pythoncontainer/
docker-build: default:
stage: build
image: image:
# An alpine-based image with the `docker` CLI installed. # An alpine-based image with the `docker` CLI installed.
name: docker:19.03.12 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 # 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 # 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. # (`docker run -p 5000:5000 yourimage`) it will be exposed at thedockerhost:5000.
...@@ -33,9 +38,16 @@ docker-build: ...@@ -33,9 +38,16 @@ docker-build:
- echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY" - echo $CI_BUILD_TOKEN | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
- docker build -t "$CI_REGISTRY_IMAGE" . - docker build -t "$CI_REGISTRY_IMAGE" .
- docker push "$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: only:
- main - 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:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment