-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile-release
33 lines (29 loc) · 1.2 KB
/
Jenkinsfile-release
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
#!groovy
pipeline {
agent none
parameters {
string(name: 'RELEASE_BRANCH_NAME', defaultValue: 'master', description: 'The branch from which to make the release')
string(name: 'RELEASE_FOLDER', defaultValue: '', description: 'Folder to copy artifacts into')
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '7', artifactNumToKeepStr: '5'))
timeout(time: 1, unit: 'HOURS')
timestamps()
ansiColor('xterm')
}
stages {
stage('Push XL-UP Blueprints to Dist server') {
agent {
node {
label 'xld||xlr||xli'
}
}
steps {
checkout scm
sh "echo 'Release folder: ${params.RELEASE_FOLDER}'"
sh "echo 'Release branch: ${params.RELEASE_BRANCH_NAME}'"
sh "rsync -razv --delete --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --include='/xl-infra/***' --include='/xl-up/***' --include='index.json' --include='LICENCE.txt' --exclude='*' . ${env.DIST_SERVER_USER}@${env.DIST_SERVER_HOSTNAME}:${env.DIST_SERVER_UP_BLUEPRINT_PATH}/${params.RELEASE_FOLDER}"
}
}
}
}