Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KNIGHT
Asyst Moodle Plugin
Commits
3dd03cce
Commit
3dd03cce
authored
Dec 31, 2024
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
55017a5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
3dd03cce
...
@@ -12,23 +12,36 @@
...
@@ -12,23 +12,36 @@
stages
:
stages
:
-
build
-
build
-
test
-
deploy
variables
:
variables
:
DOCKER_BUILDKIT
:
1
DOCKER_DRIVER
:
overlay2
BUILDKIT_INLINE_CACHE
:
1
DOCKER_TLS_CERTDIR
:
"
"
DOCKER_HOST
:
"
unix:///var/run/docker.sock"
build
:
build
:
stage
:
build
stage
:
build
image
:
docker:
24
image
:
docker:
latest
services
:
services
:
-
docker:24-dind
-
docker:dind
script
:
-
docker build -t flask-backend flask_ml_api
test
:
stage
:
test
image
:
python:3.10-slim
before_script
:
before_script
:
-
export DOCKER_TMPDIR=/mnt/volume
-
python -m venv venv
-
source venv/bin/activate
-
pip install -r requirements.txt
script
:
script
:
# - docker build --no-cache --pull --progress=plain -t flask-backend -f Dockerfile .
-
pytest tests/
-
docker build --no-cache --pull --progress=plain -t flask-backend -f Dockerfile.test .
cache
:
key
:
build-cache
paths
:
-
/mnt/volume
deploy
:
stage
:
deploy
image
:
docker:latest
services
:
-
docker:dind
script
:
-
docker-compose up -d
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment