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: ...@@ -4,8 +4,8 @@ stages:
- ci - ci
- coverage - coverage
variables: variables:
BACKEND_IMAGE: $CI_REGISTRY_USER/mcserver:latest DOCKER_DRIVER: overlay2
FRONTEND_IMAGE: $CI_REGISTRY_USER/mc_frontend:latest DOCKER_TLS_CERTDIR: ""
workflow: workflow:
rules: rules:
- if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_TAG'
...@@ -20,19 +20,16 @@ tag_version: ...@@ -20,19 +20,16 @@ tag_version:
- apk add --no-cache git - apk add --no-cache git
- python3 ./mc_frontend/update_version.py - python3 ./mc_frontend/update_version.py
build: build:
image: docker:20.10.8 image: docker:24.0.5
services: services:
- docker:20.10.8-dind - docker:24.0.5-dind
stage: build stage: build
script: script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build ./mc_frontend -t $FRONTEND_IMAGE - docker compose build mcserver
- docker push $FRONTEND_IMAGE - docker compose push mcserver
- docker build -f ./mc_backend/Dockerfile -t $BACKEND_IMAGE . - docker compose build mc_frontend
- docker push $BACKEND_IMAGE - docker compose push mc_frontend
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
ci_frontend: ci_frontend:
artifacts: artifacts:
paths: paths:
...@@ -44,9 +41,6 @@ ci_frontend: ...@@ -44,9 +41,6 @@ ci_frontend:
stage: ci stage: ci
script: script:
- docker run --rm $FRONTEND_IMAGE npm run test-ci > ci_frontend.log - docker run --rm $FRONTEND_IMAGE npm run test-ci > ci_frontend.log
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
ci_backend: ci_backend:
artifacts: artifacts:
paths: paths:
...@@ -58,9 +52,6 @@ ci_backend: ...@@ -58,9 +52,6 @@ ci_backend:
stage: ci stage: ci
script: script:
- docker run --env IS_THIS_A_DOCKER_CONTAINER=Yes --rm --entrypoint="./coverage_backend.sh" $BACKEND_IMAGE > ci_backend.log - 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: coverage:
artifacts: artifacts:
paths: paths:
......
...@@ -41,6 +41,7 @@ To generate class structures for this project automatically: ...@@ -41,6 +41,7 @@ To generate class structures for this project automatically:
1. Install OpenAPI Generator (using, e.g., `brew install openapi-generator`). 1. Install OpenAPI Generator (using, e.g., `brew install openapi-generator`).
2. 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` 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` ...@@ -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) To test your code locally, run `./coverage_local.sh` (all components)
or `docker compose run --rm --entrypoint="./coverage_backend.sh" mcserver` (only backend). 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`. To test the GitLab CI locally, run `gitlab-runner exec docker --docker-privileged JOB_NAME`.
Do not forget to insert your actual GitLab username. The `JOB_NAME` should be replaced by an actual job name from the Do not forget to specify the username and password for your chosen package registry (e.g., Docker). You can do this in
YAML configuration. 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