Zaktualizuj 'Jenkinsfile'

This commit is contained in:
Tomasz Zietkiewicz 2021-06-04 15:11:57 +02:00
parent ba46df4dbe
commit 9fd6a676d9

12
Jenkinsfile vendored
View File

@ -17,14 +17,24 @@ node {
img = docker.build('ium-helloworld') img = docker.build('ium-helloworld')
} }
stage('Train') {
img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') { img.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns ') {
stage('MLflow') {
sh 'ls -l /tmp/mlruns' sh 'ls -l /tmp/mlruns'
sh 'ls -l /mlruns' sh 'ls -l /mlruns'
sh 'python3 ./train.py' sh 'python3 ./train.py'
sh 'ls -l /tmp/mlruns' sh 'ls -l /tmp/mlruns'
sh 'ls -l /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"
}
}
} }
} }