Commit bd707250 authored by Lukas Nagel's avatar Lukas Nagel
Browse files

refactor ci definitions into subdirs

parent b6d3970a
include: docker/.gitlab-ci.yml
variables:
CI_REGISTRY: 'hub.cs.upb.de/${CI_PROJECT_PATH}'
CI_CONTAINER: '${CI_PROJECT_NAME}'
DOCKER_IMAGE: '${CI_REGISTRY}/${CI_CONTAINER}:latest'
default:
# Default Job that contains boilerplate for most Jobs.
# May be inherited from using the `extends` keyword.
# The tag `shared` is necessary to get one of the shared runners.
image: ${CI_REGISTRY}/$CI_CONTAINER:latest
image: ${DOCKER_IMAGE}
tags:
- shared
.build-docker:
# Build Container specified in `Dockerfile` and push it
# to the registry. Address of the registry and the container
# Always runs as first job iff Dockerfile was changed on master
extends: default
image: docker
stage: .pre
variables:
DOCKER_TAG: ${CI_REGISTRY}/${CI_CONTAINER}
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build -t ${DOCKER_TAG:-itt:latest} .
- docker push ${DOCKER_TAG}:latest
rebuild-docker-manual:
extends: .build-docker
when: manual
rebuild-docker-onchange:
extends: .build-docker
only:
refs:
- master
changes:
- docker/*
mindmap:
extends: default
stage: build
script:
- cd mindmap
......
.build-docker:
# Build Container specified in `Dockerfile` and push it
# to the registry. Address of the registry and the container
# Always runs as first job iff Dockerfile was changed on master
image: docker
stage: .pre
script:
- cd docker
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build -t ${DOCKER_IMAGE} .
- docker push ${DOCKER_IMAGE}
rebuild-docker-manual:
extends: .build-docker
when: manual
rebuild-docker-onchange:
extends: .build-docker
only:
refs:
- master
changes:
- docker/*
- docker/.gitlab-ci.yml
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment