ium_434766/Jenkinsfile-dvc

37 lines
1.2 KiB
Plaintext
Raw Normal View History

pipeline {
agent {
dockerfile true
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD'
)
}
stages {
stage('dvc') {
steps {
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
copyArtifacts fingerprintArtifacts: true, projectName: 's434766-create-dataset', selector: buildParameter('WHICH_BUILD')
sh 'dvc remote add -f -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 -f"
sh "dvc reproduce"
}
}
}
}
post {
success {
mail body: 'DVC success', subject: 's434766', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
archiveArtifacts 'accuracy.txt'
}
failure {
mail body: 'DVC failure', subject: 's434766', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}