-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
40 lines (39 loc) · 1.04 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
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'pipenv --python python3 sync'
}
}
stage('Test') {
steps {
sh 'pipenv run pytest'
}
}
stage('Package') {
when{
anyOf{ branch "master" ; branch 'release' }
}
steps {
sh 'zip -r sbdl.zip lib'
}
}
stage('Release') {
when{
branch 'release'
}
steps {
sh "scp -i /home/prashant/cred/edge-node_key.pem -o 'StrictHostKeyChecking no' -r sbdl.zip log4j.properties sbdl_main.py sbdl_submit.sh conf [email protected]:/home/prashant/sbdl-qa"
}
}
stage('Deploy') {
when{
branch 'master'
}
steps {
sh "scp -i /home/prashant/cred/edge-node_key.pem -o 'StrictHostKeyChecking no' -r sbdl.zip log4j.properties sbdl_main.py sbdl_submit.sh conf [email protected]:/home/prashant/sbdl-prod"
}
}
}
}