Aufgrund einer Wartung wird GitLab am 18.01. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 18.01. between 8:00 and 9:00 am.

Commit ad6ff347 authored by Sebastian Schwarz's avatar Sebastian Schwarz
Browse files

Push docker image to Gitlab CI registry.

parent 64d9e09a
Pipeline #490273 failed with stages
in 62 minutes and 58 seconds
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
DOCKER_FILE: ${CI_PROJECT_DIR}/gitlab-utils/Dockerfile DOCKER_FILE: ${CI_PROJECT_DIR}/gitlab-utils/Dockerfile
DOCKER_IMAGE_DEV: pycity_scheduling_ci DOCKER_TAG: latest
DOCKER_IMAGE: ${CI_REGISTRY_IMAGE}
stages: stages:
...@@ -12,21 +13,21 @@ stages: ...@@ -12,21 +13,21 @@ stages:
prepare: prepare:
variables:
GIT_SUBMODULE_STRATEGY: none
stage: build stage: build
before_script:
- docker version
- docker login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}"
script: script:
- mkdir -p /.docker - mkdir -p /.docker
- docker build - docker build -f ${DOCKER_FILE} -t ${DOCKER_IMAGE}:${DOCKER_TAG} /.docker
--file ${DOCKER_FILE} - docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}-base-image /.docker
tags: tags:
- docker - docker
test-prerequisites: test-prerequisites:
stage: test stage: test
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- python3.6 -m pytest -q /opt/richardsonpy/. - python3.6 -m pytest -q /opt/richardsonpy/.
- python3.6 -m pytest -q /opt/pycity_base/. - python3.6 -m pytest -q /opt/pycity_base/.
...@@ -36,7 +37,7 @@ test-prerequisites: ...@@ -36,7 +37,7 @@ test-prerequisites:
unittest: unittest:
stage: test stage: test
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt - ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt
- ln -s $CI_PROJECT_DIR/README.md $CI_PROJECT_DIR/src/README.md - ln -s $CI_PROJECT_DIR/README.md $CI_PROJECT_DIR/src/README.md
...@@ -48,7 +49,7 @@ unittest: ...@@ -48,7 +49,7 @@ unittest:
lint: lint:
stage: test stage: test
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- mkdir -p lint - mkdir -p lint
- ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt - ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt
...@@ -71,7 +72,7 @@ doc: ...@@ -71,7 +72,7 @@ doc:
stage: deploy stage: deploy
rules: rules:
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_TAG =~ /^v/' - if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_TAG =~ /^v/'
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- mkdir -p doc - mkdir -p doc
- ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt - ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt
...@@ -93,7 +94,7 @@ pages: ...@@ -93,7 +94,7 @@ pages:
- if: '$CI_COMMIT_TAG =~ /^v/' - if: '$CI_COMMIT_TAG =~ /^v/'
when: delayed when: delayed
start_in: '60 minutes' start_in: '60 minutes'
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- mkdir -p public - mkdir -p public
- mv $CI_PROJECT_DIR/docs/* public - mv $CI_PROJECT_DIR/docs/* public
...@@ -110,7 +111,7 @@ pypi-release: ...@@ -110,7 +111,7 @@ pypi-release:
- if: '$CI_COMMIT_TAG =~ /^v/' - if: '$CI_COMMIT_TAG =~ /^v/'
when: delayed when: delayed
start_in: '120 minutes' start_in: '120 minutes'
image: ${DOCKER_IMAGE_DEV}-base-image image: ${DOCKER_IMAGE}
script: script:
- mkdir -p release - mkdir -p release
- ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt - ln -s $CI_PROJECT_DIR/LICENSE.txt $CI_PROJECT_DIR/src/LICENSE.txt
...@@ -127,4 +128,3 @@ pypi-release: ...@@ -127,4 +128,3 @@ pypi-release:
- release - release
tags: tags:
- docker - docker
Markdown is supported
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