-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
41 lines (41 loc) · 1.75 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
pipeline {
agent any
parameters {
choice(name: 'SERVER', choices: ['DEV', 'STAGE', 'PROD'], description: 'Server')
}
stages {
stage('Deploy to Dev') {
when {
expression { params.SERVER == 'DEV' }
}
steps {
echo 'deply to dev'
sshagent(credentials: ['a4d999a5-6318-4659-83be-3f148a5490ca']) {
sh 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/juno/work/ci/jenkins/known_hosts voyager@silo.mskcc.org "cd /srv/services/ridgeback_dev_2/code/ridgeback && source /juno/work/ci/jenkins/lsf.sh && git pull && git checkout $BRANCH_NAME && cd /srv/services/ridgeback_dev_2 && source run_restart.sh"'
}
}
}
stage('Deploy to Stage') {
when {
expression { params.SERVER == 'STAGE' }
}
steps {
echo 'deply to stage'
sshagent(credentials: ['a4d999a5-6318-4659-83be-3f148a5490ca']) {
sh 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/juno/work/ci/jenkins/known_hosts voyager@silo.mskcc.org "cd /srv/services/staging_voyager/ridgeback/code/ridgeback && source /juno/work/ci/jenkins/lsf.sh && git pull && git checkout $BRANCH_NAME && cd ../.. && source run_restart.sh"'
}
}
}
stage('Deploy to Prod') {
when {
expression { params.SERVER == 'PROD' }
}
steps {
echo 'deply to PROD'
sshagent(credentials: ['a4d999a5-6318-4659-83be-3f148a5490ca']) {
sh 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/juno/work/ci/jenkins/known_hosts voyager@voyager.mskcc.org "cd /srv/services/ridgeback/code/ridgeback && source /juno/work/ci/jenkins/lsf.sh && git pull && git checkout $BRANCH_NAME && git pull && source run_restart.sh"'
}
}
}
}
}