ium_434804/Jenkinsfile_dvc
2021-06-12 18:25:43 +02:00

41 lines
1.4 KiB
Plaintext

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: '87e24204-a0e1-4840-b235-2b993c922d83', url: 'https://git.wmi.amu.edu.pl/s434804/ium_434804.git']]])
}
}
stage('install dependencies') {
steps {
sh 'python -m pip install dvc'
sh 'python -m pip install dvc[ssh] paramiko'
}
}
stage('DVC') {
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"
}
}
}
}
post {
success {
emailext body: currentBuild.result ?: 'DVC SUCCESS',
subject: 's434804',
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}