forked from RedHatInsights/insights-frontend-assets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
25 lines (22 loc) · 1.16 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
def wrapStep(String stepName, Closure step) {
println "In wrapStep ${stepName}"
try {
step(stepName)
} catch (e) {
notify('FAILED', stepName)
throw e
}
}
node('insights-frontend-slave') {
if ('master' == env.BRANCH_NAME) {
wrapStep('clone', { name -> stage(name) { checkout scm } })
wrapStep('deploy_legacy_api', { name -> stage(name) { sh 'rsync -arv -e "ssh -2" * [email protected]:/114034/r/insights/v1/static/' } })
wrapStep('deploy_insights', { name -> stage(name) { sh 'rsync -arv -e "ssh -2" * [email protected]:/114034/insights/static/' } })
wrapStep('deploy_insightsbeta', { name -> stage(name) { sh 'rsync -arv -e "ssh -2" * [email protected]:/114034/insightsbeta/static/' } })
wrapStep('deploy_insightsbeta', { name -> stage(name) { sh 'rsync -arv -e "ssh -2" * [email protected]:/114034/insightsalpha/static/' } })
}
if ('dev' == env.BRANCH_NAME) {
wrapStep('clone', { name -> stage(name) { checkout scm } })
wrapStep('deploy_insights', { name -> stage(name) { sh 'rsync -avPS * [email protected]:/tmp/static/' } })
}
}