From 6b5126ae8bbd102c9d2f3663d94e7f4155768a8a Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 6 Dec 2017 13:01:26 +0100 Subject: [PATCH] [Jenkins] Added subjob to update ufz/ogs-data. --- Jenkinsfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3f5fc0747b4..bb22af3549f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -380,6 +380,29 @@ pipeline { } } } + // ********************* Update ufz/ogs-data *************************** + stage('Update ogs-data') { + agent any + steps { + script { + dir('ogs') { checkout scm } + dir('ogs-data') { + checkout(changelog: false, poll: false, scm: [$class: 'GitSCM', + extensions: [[$class: 'CloneOption', shallow: true]], + userRemoteConfigs: [[ + credentialsId: '2719b702-1298-4e87-8464-5dfc62fbd923', + url: 'https://github.com/ufz/ogs-data']]]) + sh 'rsync -av --delete --exclude .git/ ../ogs/Tests/Data/ .' + sh "git add . && git commit -m 'Update'" + withCredentials([usernamePassword( + credentialsId: '2719b702-1298-4e87-8464-5dfc62fbd923', + passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { + sh 'git push https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/ufz/ogs-data HEAD:master' + } + } + } + } + } // *************************** Post ************************************ stage('Post') { agent any -- GitLab