-
Notifications
You must be signed in to change notification settings - Fork 11
/
screwdriver.yaml
127 lines (113 loc) · 4.04 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
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 code for common security issues
validate_security:
template: python/validate_security
requires: [~commit, ~pr]
verify_rpm_alma8:
template: python/package_rpm
environment:
PUBLISH: False
RPM_SCRIPTLET_DEBUG: True
image: almalinux: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:
python3.8
python3-virtualenv
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.9
deps:
python39
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_security,
verify_rpm_alma8, 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]