diff --git a/Jenkinsfile b/Jenkinsfile index f80864c204ce6cfbc0a04c792d9421095a0f28ca..fa7e9994b818d03e0accdfd7fc61d2c569f94ad2 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}/" + } } } } }