-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
69 lines (51 loc) · 1.91 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
65
66
67
68
node {
// checkout latest
checkout scm
stage('build') {
withCredentials([usernamePassword(credentialsId: 'pat',
usernameVariable: 'user',
passwordVariable: 'token')]){
pypi_base=env.PYPI_BASE
install_url = 'pip_index_url=' +
"https://user:token@" +
pypi_base + '/simple'
pip_find_index = '--index-url=https://pypi.org/simple --extra-index-url=' + install_url
pip_upload_url = 'pip_upload_url=https://' +
pypi_base + '/upload'
// pass in environment vars
environs = [ pip_find_index, pip_upload_url ]
withEnv(environs){
try {
sh '''
set +x -e
# clean if necessary
make clean
make commitno
# build wheel
make
# install locally
make update
# publish to artifact repo
make publish
'''
eggDir='aras_oslc_api.egg-info'
moduleName=eggValue(eggDir,'Name')
moduleVer=eggValue(eggDir,'Version')
buildPackage packageOpts: 'publish',
moduleName: "${moduleName}",
moduleVer: "${moduleVer}",
packageName: 'aras-oslc-api',
artifactRepoSource: 'pypy',
executeWebhook: 'true',
hookName: 'https://xxxx/deploy-oslc'
}
catch (Exception e) {
throw e
}
finally {
deleteDir()
}
}
}
}
}