-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathJenkinsfile
35 lines (30 loc) · 1.36 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
#!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 Blueprints to Dist server') {
agent {
node {
label 'xld||xlr'
}
}
steps {
checkout scm
sh "echo 'Release folder: ${params.RELEASE_FOLDER}'"
sh "echo 'Release branch: ${params.RELEASE_BRANCH_NAME}'"
sh "python ./generate_index.py"
sh "rsync -razv --delete --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --exclude '.git' --exclude '.github' --exclude '.xebialabs' --exclude 'Jenkinsfile' --exclude 'generate_index.py' --exclude 'CONTRIBUTING.md' --exclude 'xl' --exclude 'xlw' --exclude 'integration_tests.py' --exclude 'Releasefile.groovy' . ${env.DIST_SERVER_USER}@${env.DIST_SERVER_HOSTNAME}:${env.DIST_SERVER_BLUEPRINT_PATH}/${params.RELEASE_FOLDER}"
}
}
}
}