-
Notifications
You must be signed in to change notification settings - Fork 29
/
.gitlab-ci.yml
84 lines (79 loc) · 2.1 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
stages:
- pre_release # a single stage allows test to run even if flake8 fails and makes it possible to get all the errors at once
- release
# flake8:
# tags:
# - docker
# image: python:3
# stage: pre_release
# script:
# - pip install black flake8 flake8-black pep8-naming flake8-bugbear --constraint requirements-dev.txt
# - flake8 -v shotmanager
doc:
services:
- docker:20.10.10-dind
variables:
DOCKER_HOST: tcp://localhost:2376
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: /certs/client
stage: pre_release
tags:
- square_linux_dind
image: python:3
when: manual
script:
- pip install sphinx sphinx-rtd-theme
- sphinx-build -b html docs docs/_build/html
- rm -rf docs/_build/doctree
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_html"
paths:
- docs/_build
expire_in: 1 week
zip:
services:
- docker:20.10.10-dind
variables:
DOCKER_HOST: tcp://localhost:2376
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: /certs/client
tags:
- square_linux_dind
image: alpine
stage: pre_release
script:
- cp CHANGELOG.md README.md LICENSE shotmanager/
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}"
paths:
- shotmanager
expire_in: 1 week
# Note: you cannot extend this job with another only: variables job
# If you need that, you should rewrite and combine the rules
.only_version_tag:
only:
refs:
# see inject_version.py
- /^v([0-9]+)\.([0-9]+)\.([0-9]+)(\-[0-9A-Za-z-]+)?(\+[0-9A-Za-z-]+)?$/
release:
services:
- docker:20.10.10-dind
variables:
DOCKER_HOST: tcp://localhost:2376
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: /certs/client
extends:
- .only_version_tag
dependencies:
- zip
tags:
- square_linux_dind
image: python:3
stage: release
script:
- pip install requests
- python -m zipfile -c shotmanager-${CI_COMMIT_REF_NAME}.zip shotmanager/
- python -m gitlab.release shotmanager-${CI_COMMIT_REF_NAME}.zip
artifacts:
paths:
- shotmanager-${CI_COMMIT_REF_NAME}.zip