-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
15 lines (15 loc) · 930 Bytes
/
Jenkinsfile
File metadata and controls
15 lines (15 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
node {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'mpc-ci-username-password',usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
checkout([$class: 'GitSCM', branches: [[name: '*/$BRANCH_NAME']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '9058f5f0-d4af-465b-a41b-2d5a881ad649', url: 'https://github.umn.edu/mpc/apiprogram']]])
def image = docker.build('apiprogram')
sh 'ls'
image.inside('-v $WORKSPACE:/src') {
sh 'bundle exec jekyll build '
}
sh 'ls'
sh 'ls _site'
withCredentials([sshUserPrivateKey(credentialsId: 'railsmpc', keyFileVariable: 'SSH_KEYFILE', passphraseVariable: '', usernameVariable: '')]) {
sh 'rsync -avz -e "ssh -i $SSH_KEYFILE -o StrictHostKeyChecking=no" ./_site/* railsmpc@apiprogram.ipums.org:/web/apiprogram.ipums.org/'
}
}
}