-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
63 lines (55 loc) · 1.26 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE
include:
- project: "devops/gitlab-ci-template"
file: "/release.gitlab-ci.yml"
- project: "devops/gitlab-ci-template"
file: "/ssh-key.gitlab-ci.yml"
- project: "devops/gitlab-ci-template"
file: "/docker.gitlab-ci.yml"
stages:
- test
- release
- delivery_dev
- delivery_staging
- delivery_prod
.delivery:
extends: .docker
tags:
- docker-in-docker
only:
- tags
test:
image: python:3.6-stretch
stage: test
script:
- pip install poetry
- poetry install
- poetry run flake8
- poetry run pytest -v --cov-report xml:cov.xml --cov-report term --junit-xml coverage.xml --cov=src/ tests/
coverage: '/TOTAL \d+ \d+ (\d+%)/'
artifacts:
reports:
junit: coverage.xml
tags:
- docker-executor
release:
extends: .release
delivery_dev:
extends: .build and delivery
stage: delivery_dev
environment:
name: "$ENV_TAG"
variables:
ENV_TAG: dev
DOCKER_BUILD_ARGS: --build-arg PRIVATE_CI_ACCESS_TOKEN="$PRIVATE_CI_ACCESS_TOKEN"
delivery_staging:
extends: .tag and delivery
stage: delivery_staging
variables:
ENV_TAG: staging
delivery_prod:
extends: .tag and delivery
stage: delivery_prod
variables:
ENV_TAG: prod