From ac818ca76339a0291aa44be73c0e64369b6e26e2 Mon Sep 17 00:00:00 2001 From: poldy79 <leonard@penzer.de> Date: Fri, 11 May 2018 16:52:56 +0200 Subject: [PATCH] Feature: Deploy using rsync --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f80864c20..fa7e9994b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -89,6 +89,7 @@ pipeline { choice(name: 'broken', choices: '1\n0', description: 'wether to build broken targets or not') string(defaultValue: "refs/tags/v2017.1.7", name: 'gluon', description: 'gluon release tag') string(defaultValue: "*/master", name: 'site', description: 'site release tag, branch or commit') + string(defaultValue: "", name: 'deploy_to', description: 'target for rsync\nExample: www@netinfo:/home/www/html/firmware/gluon/archive/@leonard') } options { @@ -186,7 +187,7 @@ pipeline { } } - stage('manifest') { + stage('manifest and deploy') { agent { label 'master'} steps { script { fetchSources() @@ -204,6 +205,11 @@ pipeline { make manifest GLUON_BRANCH=nightly """ archiveArtifacts artifacts: 'output/images/*/*, output/packages/*/*/*/*', fingerprint: true + if (deploy_to != "") { + sh "rsync -avx output/images/factory ${params.deploy_to}/${BUILD_DATE}_${BUILD_TAG}/" + sh "rsync -avx output/images/sysupgrade ${params.deploy_to}/${BUILD_DATE}_${BUILD_TAG}/" + sh "rsync -avx output/packages ${params.deploy_to}/${BUILD_DATE}_${BUILD_TAG}/" + } } } } } -- GitLab