-
Notifications
You must be signed in to change notification settings - Fork 46
/
.gitlab-ci.yml
102 lines (91 loc) · 1.76 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
stages:
- test
- build
- deploy
mypy:
stage: test
image: registry.umiacs.umd.edu/podman/python:3.8-slim
script:
- pip install -q tox
- tox -e mypy
build_python_package:
stage: build
image: registry.umiacs.umd.edu/podman/python:3.8-slim
script:
- pip install -q -U setuptools wheel
- python setup.py sdist bdist_wheel
artifacts:
expire_in: 1hr
paths:
- dist/
only:
- tags
tags:
- podman
.build_rpm_template: &build_rpm_definition
stage: build
image: registry.umiacs.umd.edu/docker/build/umbuild:$DISTRO
script:
- make rpm
artifacts:
expire_in: 1hr
paths:
- dist/
only:
- tags
tags:
- podman
build_rpm_rhel7:
<<: *build_rpm_definition
variables:
DISTRO: rhel7
build_rpm_rhel8:
<<: *build_rpm_definition
variables:
DISTRO: rhel8
build_rpm_rhel9:
<<: *build_rpm_definition
variables:
DISTRO: rhel9
upload_pypi:
stage: deploy
image: registry.umiacs.umd.edu/podman/python:3.8-slim
script:
- pip install -q twine
- twine check dist/*
- twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*
when: manual
only:
- tags
dependencies:
- build_python_package
.deploy_rpm_template: &deploy_rpm_definition
stage: deploy
image: registry.umiacs.umd.edu/docker/build/umbuild:$DISTRO
script:
- make copy_rpm
- make createrepo
when: manual
only:
- tags
tags:
- umrepos
- podman
deploy_rpm_rhel7:
<<: *deploy_rpm_definition
variables:
DISTRO: rhel7
dependencies:
- build_rpm_rhel7
deploy_rpm_rhel8:
<<: *deploy_rpm_definition
variables:
DISTRO: rhel8
dependencies:
- build_rpm_rhel8
deploy_rpm_rhel9:
<<: *deploy_rpm_definition
variables:
DISTRO: rhel9
dependencies:
- build_rpm_rhel9