blob: 8446978101588298e0b25234afa8095ebbc1bf35 (
plain)
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
85
86
87
|
image: nbxmpp-master:latest
stages:
- test
- build
- deploy
- publish
test-pylint:
stage: test
script:
- python3 .ci/pylint-test.py
- NBXMPP_EXTERNAL_UNIT_TESTS=1 coverage run --source=nbxmpp -m unittest discover -v
- coverage report -mi
- coverage xml -i
- pip install .
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
build-unix:
stage: build
dependencies: []
script:
- pip install git+https://dev.gajim.org/gajim/release-helper.git
- pip install build
- python3 -m build
- release-helper build-debian-pkg "$(find dist/nbxmpp-*.tar.gz)" 1 --pkgprefix=python3 --pkgsuffix=nightly
artifacts:
name: "nbxmpp-$CI_COMMIT_SHA"
expire_in: 1 week
paths:
- dist/nbxmpp-*.tar.gz
- dist/nbxmpp-*.whl
- debian_build/*
deploy-pypi:
image: nbxmpp-deploy:latest
stage: deploy
dependencies:
- "build-unix"
rules:
- if: '$CI_COMMIT_TAG'
script:
- twine upload --username=__token__ --password=$PYPI_TOKEN dist/*
deploy-debian-nightly:
image: nbxmpp-deploy:latest
stage: deploy
dependencies:
- build-unix
rules:
- if: '$NIGHTLY_BUILD'
allow_failure:
exit_codes:
- 100
script:
- |
if [ "$FORCE_DEB_DEPLOY" != "true" ]
then
release-helper nightly-check
fi
- >
release-helper deploy-to-ftp \
--host=$FTP_HOST \
--user=$FTP_USER \
--password=$FTP_PASS \
--directory=debian/nbxmpp/"$(date +'%Y%m%d')" \
debian_build
publish-release:
image: nbxmpp-publish:latest
stage: publish
dependencies: []
rules:
- if: '$CI_COMMIT_TAG'
script:
- >
release-helper create-release \
$CI_PROJECT_ID \
$CI_RELEASE_TOKEN \
--version=$CI_COMMIT_TAG \
--tag=$CI_COMMIT_TAG
|