This repository has been archived by the owner on Oct 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
78 lines (73 loc) · 1.97 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
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 videotracks
# doc:
# stage: pre_release
# tags:
# - docker
# 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 videotracks/
artifacts:
name: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}"
paths:
- videotracks
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 videotracks-${CI_COMMIT_REF_NAME}.zip videotracks/
- python -m gitlab.release videotracks-${CI_COMMIT_REF_NAME}.zip
artifacts:
paths:
- videotracks-${CI_COMMIT_REF_NAME}.zip