Skip to content
Snippets Groups Projects
Commit 9b8bb615 authored by Konstantin Schulz's avatar Konstantin Schulz
Browse files

update Docker (dind) to fix threading issues

parent a94e54eb
No related branches found
No related tags found
No related merge requests found
Pipeline #51022 failed
......@@ -4,8 +4,8 @@ stages:
- ci
- coverage
variables:
BACKEND_IMAGE: $CI_REGISTRY_USER/mcserver:latest
FRONTEND_IMAGE: $CI_REGISTRY_USER/mc_frontend:latest
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
workflow:
rules:
- if: '$CI_COMMIT_TAG'
......@@ -20,19 +20,16 @@ tag_version:
- apk add --no-cache git
- python3 ./mc_frontend/update_version.py
build:
image: docker:20.10.8
image: docker:24.0.5
services:
- docker:20.10.8-dind
- docker:24.0.5-dind
stage: build
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build ./mc_frontend -t $FRONTEND_IMAGE
- docker push $FRONTEND_IMAGE
- docker build -f ./mc_backend/Dockerfile -t $BACKEND_IMAGE .
- docker push $BACKEND_IMAGE
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
- docker compose build mcserver
- docker compose push mcserver
- docker compose build mc_frontend
- docker compose push mc_frontend
ci_frontend:
artifacts:
paths:
......@@ -44,9 +41,6 @@ ci_frontend:
stage: ci
script:
- docker run --rm $FRONTEND_IMAGE npm run test-ci > ci_frontend.log
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
ci_backend:
artifacts:
paths:
......@@ -58,9 +52,6 @@ ci_backend:
stage: ci
script:
- docker run --env IS_THIS_A_DOCKER_CONTAINER=Yes --rm --entrypoint="./coverage_backend.sh" $BACKEND_IMAGE > ci_backend.log
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
coverage:
artifacts:
paths:
......
......@@ -41,6 +41,7 @@ To generate class structures for this project automatically:
1. Install OpenAPI Generator (using, e.g., `brew install openapi-generator`).
2.
Run: `openapi-generator generate -i mc_backend/mcserver/mcserver_api.yaml -g typescript-angular -o mc_frontend/openapi/ && openapi-generator generate -i mc_backend/mcserver/mcserver_api.yaml -g python-flask -o mc_backend/openapi/ && python mc_backend/openapi_generator.py`
.
......@@ -68,6 +69,7 @@ To update the changelog, use: `git log --oneline --decorate > CHANGELOG`
To test your code locally, run `./coverage_local.sh` (all components)
or `docker compose run --rm --entrypoint="./coverage_backend.sh" mcserver` (only backend).
To test the GitLab CI locally, run `gitlab-runner exec docker --docker-privileged --env CI_REGISTRY_USER=YOUR_USERNAME JOB_NAME`.
Do not forget to insert your actual GitLab username. The `JOB_NAME` should be replaced by an actual job name from the
YAML configuration.
To test the GitLab CI locally, run `gitlab-runner exec docker --docker-privileged JOB_NAME`.
Do not forget to specify the username and password for your chosen package registry (e.g., Docker). You can do this in
the .gitlab-ci.yml variables, or in the GitLab UI, using `CI_REGISTRY_USER` and `CI_REGISTRY_PASSWORD`.
The `JOB_NAME` should be replaced by an actual job name from the YAML configuration.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment