-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (37 loc) · 1.01 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
image: docker:latest
stages:
- build
- test
variables:
DOCKER_DRIVER: overlay2
REQUIREMENTS_DEB_IMAGE: $CI_REGISTRY_IMAGE/requirements-deb
FULL_DEB_IMAGE: $CI_REGISTRY_IMAGE/full-deb
services:
- docker:dind
before_script:
- docker info || true
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY || true
build:deb:
tags:
- dedi
stage: build
script:
- docker pull $FULL_DEB_IMAGE:latest || true
- docker build --cache-from $FULL_DEB_IMAGE:latest -t full -f docker/Dockerfile.debian .
- docker tag full $FULL_DEB_IMAGE
- docker push $FULL_DEB_IMAGE
- docker build --cache-from $FULL_DEB_IMAGE:latest --target requirements -t requirements-deb -f docker/Dockerfile.debian .
- docker tag requirements-deb $REQUIREMENTS_DEB_IMAGE
- docker push $REQUIREMENTS_DEB_IMAGE
test:pytest:
stage: test
image: $FULL_DEB_IMAGE
script:
- cd /finntk
- pytest tests.py
test:flake8:
stage: test
image: $FULL_DEB_IMAGE
script:
- cd /finntk
- flake8