Skip to content

Commit 6e0c3b5

Browse files
author
sebastianpfischer
committed
ci: add jenkinsfile for pypi releases
1 parent 43b8869 commit 6e0c3b5

2 files changed

Lines changed: 98 additions & 4 deletions

File tree

Jenkinsfile

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
pipeline
2+
{
3+
agent
4+
{
5+
kubernetes
6+
{
7+
containerTemplate
8+
{
9+
name 'kiso-build-env'
10+
image 'eclipse/kiso-build-env:v0.1.0'
11+
alwaysPullImage 'true'
12+
ttyEnabled true
13+
resourceRequestCpu '2'
14+
resourceLimitCpu '2'
15+
resourceRequestMemory '8Gi'
16+
resourceLimitMemory '8Gi'
17+
}
18+
}
19+
}
20+
options
21+
{
22+
timeout(time: 2, unit: 'HOURS')
23+
}
24+
stages
25+
{
26+
stage('Release')
27+
{
28+
when
29+
{
30+
buildingTag()
31+
}
32+
steps
33+
{
34+
script
35+
{
36+
sh "pip install twine"
37+
sh "pip install wheel"
38+
sh "python setup.py sdist"
39+
sh "python setup.py bdist_wheel"
40+
sh "twine upload dist/*"
41+
withCredentials([string(
42+
credentialsId: 'pypi-bot-token',
43+
variable: 'token')]) {
44+
45+
sh "twine upload\
46+
--verbose \
47+
--username __token__\
48+
--password ${token}\
49+
dist/*"
50+
}
51+
}
52+
}
53+
} // Release
54+
} // stages
55+
56+
post // Called at very end of the script to notify developer and github about the result of the build
57+
{
58+
success
59+
{
60+
cleanWs()
61+
}
62+
unstable
63+
{
64+
notifyFailed()
65+
}
66+
failure
67+
{
68+
notifyFailed()
69+
}
70+
aborted
71+
{
72+
notifyAbort()
73+
}
74+
}
75+
} // pipeline
76+
77+
78+
def notifyFailed()
79+
{
80+
emailext (subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) is failing",
81+
body: "Oups, something went wrong with ${env.BUILD_URL}... We are looking forward for your fix!",
82+
recipientProviders: [[$class: 'CulpritsRecipientProvider'],
83+
[$class: 'DevelopersRecipientProvider'],
84+
[$class: 'RequesterRecipientProvider']])
85+
}
86+
87+
def notifyAbort()
88+
{
89+
emailext (subject: "Job '${env.JOB_NAME}' (${env.BUILD_NUMBER}) was aborted",
90+
body: "Oups, something went wrong with ${env.BUILD_URL}... We are looking forward for your fix!",
91+
recipientProviders: [[$class: 'CulpritsRecipientProvider'],
92+
[$class: 'DevelopersRecipientProvider'],
93+
[$class: 'RequesterRecipientProvider']])
94+
}

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
setup(
1919
# Needed to silence warnings (and to be a worthwhile package)
20-
name="python-uds",
20+
name="pykiso-python-uds",
2121
url="https://github.com/BKaDamien/python-uds",
22-
author="Richard Clubb, KAYSER Damien",
23-
author_email="richard.clubb@embeduk.com, external.Damien.Kayser@de.bosch.com",
22+
author="Richard Clubb, KAYSER Damien, Sebastian Clerson",
23+
author_email="richard.clubb@embeduk.com, external.Damien.Kayser@de.bosch.com, external.Sebastian.Clerson@de.bosch.com",
2424
# Needed to actually package something
2525
packages=find_packages(exclude=["test", "test.*"]),
2626
# Needed for dependencies
@@ -29,7 +29,7 @@
2929
version="2.1.0",
3030
# The license can be anything you like
3131
license="MIT",
32-
description="A library for interfacing with UDS using python and pykiso",
32+
description="Please use python-uds instead, this is a refactored version with breaking changes, only for pykiso",
3333
# We will also need a readme eventually (there will be a warning)
3434
# long_description=open('README.txt').read(),
3535
classifiers=[

0 commit comments

Comments
 (0)