From 9fd6a676d94cea27314ddac87195a193d356b2f8 Mon Sep 17 00:00:00 2001 From: Tomasz Zietkiewicz Date: Fri, 4 Jun 2021 15:11:57 +0200 Subject: [PATCH] Zaktualizuj 'Jenkinsfile' --- Jenkinsfile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fd313cd..1ec913f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,15 +16,25 @@ node { stage('Environment') { // for display purposes img = docker.build('ium-helloworld') } + + img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') { - stage('Train') { - img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') { + stage('MLflow') { sh 'ls -l /tmp/mlruns' sh 'ls -l /mlruns' - sh 'python3 ./train.py' + sh 'python3 ./train.py' sh 'ls -l /tmp/mlruns' sh 'ls -l /mlruns' } + + stage("DVC"){ + withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) { + sh "dvc init" + sh "dvc remote add -d ium_ssh_remote ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl/ium-sftp" + sh "dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY" + sh "dvc pull" + } + } } }