-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (26 loc) · 802 Bytes
/
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
pipeline {
agent any
environment {
NEXUS_CREDENTIALS = credentials('nexus')
}
stages {
stage("package") {
steps {
sh 'rm -fr dist/'
sh 'python3 -m build'
}
}
stage("test") {
steps {
echo 'Here i\'m testing'
}
}
stage("deploy") {
steps {
echo 'Deploying application ...'
sh "python3 -m twine upload --repository-url http://172.17.0.4:8081/repository/usine-dap/ -u ${env.NEXUS_CREDENTIALS_USR} -p ${env.NEXUS_CREDENTIALS_PSW} dist/*"
sh "python3 -m twine upload -u ${env.PYPI_CREDENTIALS_USR} -p ${env.PYPI_CREDENTIALS_PSW} dist/*"
}
}
}
}