From 0bd905830ad16707dd5c482933f7565597349e1c Mon Sep 17 00:00:00 2001 From: michalzareba Date: Sat, 12 Jun 2021 17:54:38 +0200 Subject: [PATCH] Add dvc yaml solution lab10 --- Jenkinsfile_DVC | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Jenkinsfile_DVC diff --git a/Jenkinsfile_DVC b/Jenkinsfile_DVC new file mode 100644 index 0000000..0547651 --- /dev/null +++ b/Jenkinsfile_DVC @@ -0,0 +1,24 @@ +pipeline{ + agent { + docker { + image 's434804/ium:0.5' + args '-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ' + } + } + stages{ + stage('checkout: Check out from version control'){ + steps{ + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '3e2b5ea1-7a08-4418-892b-c562315036a4', url: 'https://git.wmi.amu.edu.pl/s430705/ium_430705']]]) + } + } + stage("DVC"){ + withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) { + sh 'pip install dvc' + sh 'pip install dvc[ssh] paramiko' + sh 'ssh ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl -i $IUM_SFTP_KEY' + sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY' + sh "dvc pull" + sh "dvc reproduce" + } + } +} \ No newline at end of file