/
Jenkinsfile
41 lines (41 loc) · 1.07 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 {
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '5', numToKeepStr: '5'))
}
agent {
node {
label 'ubuntu-18.04'
}
}
stages {
stage('master -> https://sngls.blaize.tech') {
when {
branch 'master'
}
steps {
sshagent(['snglsdao-www']) {
sh 'rsync -a --cvs-exclude --verbose --delete -e "ssh -o StrictHostKeyChecking=no" ./ snglsdao-www@test.blaize.tech:/var/www/sngls.blaize.tech/'
}
}
}
stage('master -> https://stage.snglsdao.io') {
when {
branch 'master'
}
steps {
sshagent(['snglsdao-www']) {
sh 'rsync -a --cvs-exclude --verbose --delete -e "ssh -o StrictHostKeyChecking=no" ./ snglsdao-www@stage.snglsdao.io:/var/www/stage.snglsdao.io/'
}
}
}
stage('archive production branch') {
when {
branch 'production'
}
steps {
archiveArtifacts(artifacts: '**', onlyIfSuccessful: true)
}
}
}
}