ium_440058/dvc/Jenkinsfile

40 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-06-11 19:03:42 +02:00
pipeline {
agent {
dockerfile true
}
parameters{
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'WHICH_BUILD'
)
}
stages {
stage('checkout: Check out from version control') {
steps {
git 'https://git.wmi.amu.edu.pl/s434700/ium_s440058.git'
}
}
stage("DVC"){
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
sh 'ssh ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl -i $IUM_SFTP_KEY'
2021-06-11 19:14:37 +02:00
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 keyfile $IUM_SFTP_KEY"
2021-06-11 19:03:42 +02:00
sh "dvc pull"
2021-06-11 19:14:37 +02:00
sh "dvc reproduce"
2021-06-11 19:03:42 +02:00
}
}
}
post {
success {
build job: 's440058-dvc'
mail body: 'SUCCESS TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure {
mail body: 'FAILURE TRAINING', subject: 's440058', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
}
}