-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathJenkinsfile.update-dependency
30 lines (30 loc) · 1.23 KB
/
Jenkinsfile.update-dependency
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
elifeUpdatePipeline(
{ commit ->
lock('elife-bot--ci') {
// ensure elife-bot--ci is on master
builderDeployRevision 'elife-bot--ci', commit
if (params.package && params.tag) {
// on the elife-bot--ci instance, activate venv, run the 'update single dependency' script
builderCmd "elife-bot--ci", "./update-dependencies.sh ${params.package} ${params.tag}", "/opt/elife-bot", true
} else {
if (params.package || params.tag) {
error "specify both 'package' and 'tag' build parameters or neither"
return
}
builderCmd "elife-bot--ci", "./update-dependencies.sh", "/opt/elife-bot", true
}
// rsync remote elife-bot to a ... local elife-bot?
builderSync "ci--bot.elife.internal", "/opt/elife-bot/"
// add the modified files
sh "git add Pipfile Pipfile.lock requirements.txt"
}
},
{
if (params.package && params.tag) {
return "Dependency `${params.package}` pinned to `${params.tag}`"
} else {
return "Dependency update"
}
},
"update_${params.package}/"
)