ium_s449288/lab10/Jenkinsfile_dvc

31 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-05-23 10:58:50 +02:00
pipeline {
agent {
2022-05-31 15:47:28 +02:00
dockerfile{
2022-05-30 12:10:35 +02:00
dir 'lab10'
}
2022-05-30 12:09:36 +02:00
}
2022-05-23 10:58:50 +02:00
stages {
2022-05-31 15:47:28 +02:00
stage('Stage 1') {
steps {
echo 'Checking out...'
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'f695fe86-8cca-47f7-a546-d3bfd1059fd4', url: 'https://git.wmi.amu.edu.pl/s449288/ium_s449288.git']]])
echo 'Checked out'
/* sh 'git clone https://git.wmi.amu.edu.pl/s449288/ium_s449288.git' - wykonane raz */
withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {
echo 'Pulling from DVC'
2022-05-30 13:52:41 +02:00
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
2022-05-30 20:49:21 +02:00
sh 'dvc pull'
2022-05-31 15:58:43 +02:00
echo 'Pulled'
2022-05-31 15:59:28 +02:00
echo 'Running pipeline'
2022-05-30 21:29:16 +02:00
sh 'dvc repro'
2022-05-31 15:59:28 +02:00
echo 'Pipeline finished'
2022-05-30 21:17:54 +02:00
echo 'Files resulting from pipeline:'
2022-05-30 21:23:10 +02:00
sh 'ls -lh lego_reg_model'
2022-05-30 21:17:54 +02:00
sh 'head lego_reg_results.csv'
2022-05-30 21:29:16 +02:00
sh 'rm -r dvc.lock'
2022-05-31 15:47:28 +02:00
}
2022-05-30 13:52:41 +02:00
}
2022-05-31 15:47:28 +02:00
}
2022-05-23 10:58:50 +02:00
}
2022-05-31 15:47:28 +02:00
}