-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathJenkinsfile
52 lines (47 loc) · 1.54 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
pipeline {
agent any
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
}
stages {
stage("Pipeline") {
stages {
stage("Checkout") {
steps {
checkout([
$class : 'GitSCM',
branches : scm.branches,
extensions : scm.extensions + [[$class: 'CleanBeforeCheckout']],
userRemoteConfigs: scm.userRemoteConfigs
])
}
}
stage("Build") {
steps {
echo "Building.."
sh "python3 -m venv .venv"
sh '''#!/bin/bash
source .venv/bin/activate
'''
sh "./proto/codegen.sh"
sh "python3 -m pip install build"
sh "python3 -m build"
}
}
stage("Upload") {
steps {
echo "Uploading archives.."
sh "python3 -m pip install twine"
sh "python3 -m twine upload --repository ecosystem-python-dev-local dist/*"
}
}
}
}
}
post {
cleanup {
cleanWs()
}
}
}