-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
80 lines (73 loc) · 1.69 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
stages:
- check
- test
- build
- test release
- release
before_script:
- export LANG=en_US.UTF-8
check:
stage: check
image: $PYTHON_TOX_IMAGE_LATEST
script:
- tox
test:
stage: test
image: $PYTHON_TOX_IMAGE_LATEST
script:
- tox -e unit-tests
test-build:
stage: build
image: quay.io/prodsecdev/fedora-latest:latest
script:
- dnf install -y python3.9 python3-pip
- python3 -m venv venv && source venv/bin/activate
- python3 -m pip install --upgrade build
- python3 -m build
except:
- tags
build:
stage: build
image: quay.io/prodsecdev/fedora-latest:latest
script:
- dnf install -y python3.9 python3-pip
- python3 -m venv venv && source venv/bin/activate
- python3 -m pip install --upgrade build
- python3 -m build
artifacts:
untracked: false
expire_in: 1 week
paths:
- dist/
only:
- /\d+\.\d+\.\d+/
except:
- branches
test-pypi-release:
stage: test release
image: quay.io/prodsecdev/fedora-latest:latest
dependencies:
- build
script:
- dnf install -y python3.9 python3-pip
- python3 -m venv venv && source venv/bin/activate
- python3 -m pip install --upgrade twine
- python3 -m twine upload --repository testpypi dist/* -u __token__ -p $TEST_PYPI_TOKEN
only:
- /\d+\.\d+\.\d+/
except:
- branches
pypi-release:
stage: release
image: quay.io/prodsecdev/fedora-latest:latest
dependencies:
- build
script:
- dnf install -y python3.9 python3-pip
- python3 -m venv venv && source venv/bin/activate
- python3 -m pip install --upgrade twine
- python3 -m twine upload dist/* -u __token__ -p $PYPI_TOKEN
only:
- /\d+\.\d+\.\d+/
except:
- branches