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
a4af2fc5
Commit
a4af2fc5
authored
Jan 03, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
54121ad1
Pipeline
#10676
failed with stages
in 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a4af2fc5
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
stages
:
stages
:
-
build
-
build
-
test
-
deploy
-
deploy
variables
:
variables
:
...
@@ -23,25 +24,24 @@ build:
...
@@ -23,25 +24,24 @@ build:
stage
:
build
stage
:
build
image
:
docker:latest
image
:
docker:latest
services
:
services
:
-
name
:
docker:dind
-
docker:dind
command
:
[
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
script
:
-
docker build -t flask-backend flask_ml_api
test
:
stage
:
test
image
:
python:3.11-slim
before_script
:
before_script
:
-
mkdir -p /mnt/volume
-
python -m venv venv
-
mount /dev/vdb /mnt/volume || echo "Already mounted"
-
source venv/bin/activate
-
export DOCKER_TMPDIR=/mnt/volume
-
pip install -r requirements.txt
-
docker system prune -a -f --volumes ||
true
-
df -h
script
:
script
:
-
docker build --no-cache --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
-
pytest tests/
cache
:
key
:
build-cache
paths
:
-
/mnt/volume
timeout
:
1h
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
dependencies
:
image
:
docker:latest
-
build
services
:
-
docker:dind
script
:
script
:
-
docker
run -d flask-backend-full
-
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