forked from modelo/API_samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
34 lines (33 loc) · 1.03 KB
/
Jenkinsfile
File metadata and controls
34 lines (33 loc) · 1.03 KB
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
pipeline {
agent any
stages {
stage('Test and Deploy') {
when { anyOf { branch 'master'; } }
steps {
sh '''rm Jenkinsfile README.md
ls'''
withCredentials(bindings: [file(credentialsId: '15862533-4746-4599-9b5e-8c5da18a3d65', variable: 'DEV_BIM_FRONTEND_PEM')]) {
sh '''
scp -r -o StrictHostKeyChecking=no -i $DEV_BIM_FRONTEND_PEM ./* [email protected]:/home/ubuntu/api-samples/
'''
}
}
}
stage('Deploy Develop') {
when { anyOf { branch 'develop'; } }
steps {
sh '''rm Jenkinsfile README.md
ls'''
withCredentials(bindings: [file(credentialsId: '15862533-4746-4599-9b5e-8c5da18a3d65', variable: 'DEV_BIM_FRONTEND_PEM')]) {
sh '''
scp -r -o StrictHostKeyChecking=no -i $DEV_BIM_FRONTEND_PEM ./* [email protected]:/home/ubuntu/api-samples-develop/
'''
}
}
}
}
options {
// retry(3)
timeout(time: 30, unit: 'MINUTES')
}
}