Commit 67c79a93 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

CI now pushes to and pulls from Docker Hub

parent 13c22918
Pipeline #32283 failed with stages
in 6 minutes and 15 seconds
workflow:
rules:
- if: '$CI_COMMIT_TAG'
when: never
- when: always
stages:
- tag_version
- build
- ci
- coverage
variables:
BACKEND_IMAGE: $CI_REGISTRY_USER/mcserver:latest
FRONTEND_IMAGE: $CI_REGISTRY_USER/mc_frontend:latest
workflow:
rules:
- if: '$CI_COMMIT_TAG'
when: never
- when: always
tag_version:
image: python:3.8-alpine
stage: tag_version
......@@ -21,8 +24,11 @@ build:
- docker:20.10.8-dind
stage: build
script:
- docker build ./mc_frontend -t machina_callida/mc_frontend:latest
- docker build ./mc_frontend -t machina_callida/mcserver:latest
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build ./mc_frontend -t $FRONTEND_IMAGE
- docker push $FRONTEND_IMAGE
- docker build ./mc_frontend -t $BACKEND_IMAGE
- docker push $BACKEND_IMAGE
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
......@@ -36,7 +42,7 @@ ci_frontend:
- docker:20.10.8-dind
stage: ci
script:
- docker run --rm --entrypoint="npm run test-ci" machina_callida/mc_frontend:latest > ci_frontend.log
- docker run --rm --entrypoint="npm run test-ci" $FRONTEND_IMAGE > ci_frontend.log
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
......@@ -50,7 +56,7 @@ ci_backend:
- docker:20.10.8-dind
stage: ci
script:
- docker run --rm --entrypoint="./coverage_backend.sh" machina_callida/mcserver:latest > ci_backend.log
- docker run --rm --entrypoint="./coverage_backend.sh" $BACKEND_IMAGE > ci_backend.log
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
......
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