-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
112 lines (99 loc) · 2.43 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
stages:
- test
- build
- release
.run_tests: &run_tests
stage: test
variables:
TOX_SKIP_ENV: lint
before_script:
- pip install tox
script:
- tox -v
lint:
<<: *run_tests
image: python:3.8-buster
variables:
TOX_SKIP_ENV: test-*
test:python35:
<<: *run_tests
image: python:3.5-alpine
test:python36:
<<: *run_tests
image: python:3.6-alpine
test:python37:
<<: *run_tests
image: python:3.7-alpine
test::python38:
<<: *run_tests
image: python:3.8-alpine
test::python-next:
<<: *run_tests
image: python:rc-alpine
build::arch-package:
stage: build
image: git-registry.hack-hro.de:443/kmohrf/docker-recipes/archbuild-python
before_script:
- "echo '%wheel ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/build"
- useradd --create-home --user-group --groups wheel build
script:
- PKGEXT='.pkg.tar.xz' su build -- makepkg --syncdeps
artifacts:
paths:
- '*.pkg.tar.xz'
expire_in: 1w
build::deb-package:
stage: build
image: git-registry.hack-hro.de:443/kmohrf/docker-recipes/debbuild-python:buster
variables:
PYBUILD_DISABLE: test
script:
- make dist-deb DEBIAN_BUILDPACKAGE_COMMAND="dpkg-buildpackage -sa --no-sign" DISABLE_PYTHON_TESTS=1
artifacts:
paths:
- build/debian
expire_in: 1w
build::info:
image: alpine
stage: build
before_script:
- apk add git
script:
- echo "VERSION=$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/^v//')" >>build.env
- git log $(git describe --tags --abbrev=0 --first-parent HEAD^)..HEAD --pretty=format:'* %s' >CHANGELOG
artifacts:
name: CHANGELOG
paths:
- CHANGELOG
reports:
dotenv: build.env
release::arch-package:
stage: release
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Storing Arch Linux Package"
artifacts:
name: Package for ArchLinux and Derivates
paths:
- "python-onkyrimote-$VERSION-1-any.pkg.tar.xz"
expire_in: never
release::deb-package:
stage: release
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Storing Deb Package"
artifacts:
name: Package for Debian and Derivates
paths:
- build/debian
expire_in: never
release::info:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Creating release for $CI_COMMIT_TAG"
- release-cli create --name "Release $CI_COMMIT_TAG" --tag-name "$CI_COMMIT_TAG" --description "$(cat CHANGELOG)"