-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
64 lines (54 loc) · 1.59 KB
/
Jenkinsfile
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
pipeline {
agent {
dockerfile true
}
stages {
stage('Build') {
steps {
sh '''
echo "This is your building Block"
python -V
python setup.py build sdist bdist_wheel --universal
'''
}
}
stage('Test') {
steps {
sh '''
echo "This is your testing Block"
python setup.py test
'''
}
}
stage('Deploy') {
environment {
TWINE_USERNAME = 'damasosanoja'
TWINE_PASSWORD = 'Mx76Z$!Lcq'
}
steps {
sh '''
echo "This is your deployment Block"
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
'''
}
}
}
post {
always {
echo 'Actions here will always happen.'
cleanWs()
}
success {
echo 'If you see this is because we succeed'
}
unstable {
echo 'Sorry, I am unstable :/'
}
failure {
echo 'You have to try again, because Pipeline failed :('
}
changed {
echo 'Things were different before...'
}
}
}