-
Notifications
You must be signed in to change notification settings - Fork 17
/
screwdriver.yaml
167 lines (149 loc) · 5.53 KB
/
screwdriver.yaml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
version: 4
shared:
environment:
CHANGELOG_FILENAME: docs/changelog.md
INVIRTUALENV_LOG_LEVEL: debug
PACKAGE_DIRECTORY: invirtualenv
RPM_SCRIPTLET_DEBUG: 'True'
jobs:
# Run the unittests
validate_test:
template: python/validate_unittest
requires: [~commit, ~pr]
# Run the code linter
validate_lint:
template: python/validate_lint
requires: [~commit, ~pr]
# Validate code follows the style guide
validate_codestyle:
template: python/validate_codestyle
requires: [~commit, ~pr]
# Check for use of package dependencies that have security issues
validate_dep:
template: python/validate_safety
steps:
- validate_code: pypirun --upgrade_pip safety,. safety check --json -o safetydb.json || true
requires: [~commit, ~pr]
# Check code for common security issues
validate_security:
template: python/validate_security
requires: [~commit, ~pr]
verify_rpm_centos7:
template: python/package_rpm
environment:
PUBLISH: False
image: centos:7
steps:
- postmotd: |
cat > deploy.conf <<EOF
[global]
name = serviceping
description = invirtualenv utility for deploying python applicatons
version = 18.8.1
link_bin_files = True
virtualenv_dir = /var/lib/virtualenvs
basepython=/usr/bin/python3
[pip]
deps:
serviceping==18.8.1
[rpm_package]
basepython=/usr/bin/python3
deps:
python3
EOF
- postupdate_version: |
export PIP_FIND_LINKS="file://`pwd`/dist"
$BASE_PYTHON setup.py sdist bdist_wheel
echo $PIP_FIND_LINKS
- postinstall_utility: |
# Install the version from this repo instead of the invirtualenv from pypi
$BASE_PYTHON -m pip install .
- preend: /usr/bin/serviceping --help
requires: [~commit, ~pr]
verify_rpm_centos8:
template: python/package_rpm
environment:
PUBLISH: False
image: centos:8
steps:
- postmotd: |
cat > deploy.conf <<EOF
[global]
name = serviceping
description = invirtualenv utility for deploying python applicatons
version = 18.8.1
link_bin_files = True
virtualenv_dir = /var/lib/virtualenvs
basepython=/usr/bin/python3
[pip]
deps:
serviceping==18.8.1
[rpm_package]
basepython=/usr/bin/python3.8
deps:
python38
EOF
- postupdate_version: |
export PIP_FIND_LINKS="file://`pwd`/dist/"
$BASE_PYTHON setup.py sdist bdist_wheel
echo $PIP_FIND_LINKS
- postinstall_utility: |
# Install the version from this repo instead of the invirtualenv from pypi
$BASE_PYTHON -m pip install .
- preend: /usr/bin/serviceping --help
requires: [~commit, ~pr]
verify_rpm_fedora:
template: python/package_rpm
environment:
PUBLISH: False
image: fedora
steps:
- postmotd: |
cat > deploy.conf <<EOF
[global]
name = serviceping
description = invirtualenv utility for deploying python applicatons
version = 18.8.1
link_bin_files = True
virtualenv_dir = /var/lib/virtualenvs
basepython=/usr/bin/python3
[pip]
deps:
serviceping==18.8.1
[rpm_package]
basepython=/usr/bin/python3.6
deps:
python36
EOF
- postupdate_version: |
export PIP_FIND_LINKS="file://`pwd`/dist"
$BASE_PYTHON setup.py sdist bdist_wheel
echo $PIP_FIND_LINKS
- postinstall_utility: |
# Install the version from this repo instead of the invirtualenv from pypi
$BASE_PYTHON -m pip install .
- preend: /usr/bin/serviceping --help
requires: [~commit, ~pr]
# Generate a package version to publish
generate_version:
template: python/generate_version
requires: [
validate_test, validate_lint, validate_codestyle, validate_dep, validate_security,
verify_rpm_centos7, verify_rpm_centos8, verify_rpm_fedora
]
publish_test_pypi:
template: python/package_python
environment:
PUBLISH: True
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
requires: [generate_version]
verify_test_package:
template: python/validate_pypi_package
environment:
PYPI_INDEX_URL: https://test.pypi.org/simple
requires: [publish_test_pypi]
publish_prod_pypi:
template: python/package_python
environment:
PUBLISH: True
requires: [verify_test_package]