ium_434804/Jenkinsfile_dvc

41 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-06-12 18:15:43 +02:00
pipeline {
agent {
docker {
image 's434804/ium:0.5'
args '-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns '
}
}
stages {
2021-06-12 18:18:15 +02:00
stage('checkout: Check out from version control'){
2021-06-12 18:15:43 +02:00
steps{
2021-06-12 18:25:43 +02:00
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg:
[], userRemoteConfigs: [[credentialsId: '87e24204-a0e1-4840-b235-2b993c922d83', url: 'https://git.wmi.amu.edu.pl/s434804/ium_434804.git']]])
2021-06-12 18:18:15 +02:00
}
}
stage('install dependencies') {
steps {
sh 'python -m pip install dvc'
sh 'python -m pip install dvc[ssh] paramiko'
}
2021-06-12 18:15:43 +02:00
}
2021-06-12 18:19:38 +02:00
stage('DVC') {
2021-06-12 18:21:12 +02:00
steps {
withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) {
sh "dvc init -f"
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 password $IUM_SFTP_PASS"
sh "dvc pull"
sh "dvc reproduce"
}
2021-06-12 18:18:15 +02:00
}
2021-06-12 18:15:43 +02:00
}
}
post {
success {
2021-06-12 18:25:43 +02:00
emailext body: currentBuild.result ?: 'DVC SUCCESS',
subject: 's434804',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
2021-06-12 18:15:43 +02:00
}
}
}