ium_s449288/lab10/Jenkinsfile_dvc

35 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-05-23 10:58:50 +02:00
pipeline {
agent {
dockerfile {
dir 'lab10'
args '-v /dvcstore'
}
}
stages {
stage('Stage 1') {
steps {
2022-05-29 17:42:42 +02:00
echo 'Cloning and switching to repo'
2022-05-29 18:06:50 +02:00
/* sh 'git clone https://git.wmi.amu.edu.pl/s449288/ium_s449288.git' - już raz wykonane*/
2022-05-29 17:31:32 +02:00
sh 'ls -lh'
2022-05-29 17:17:36 +02:00
sh 'cd ium_s449288'
echo 'In ium_s449288 now'
echo 'Creating dvc remote'
2022-05-30 11:15:16 +02:00
/*withCredentials([sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY')]) {*/
withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) {
sh 'dvc remote add -f -d ium_ssh_remote ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl'
sh 'dvc remote modify --local ium_ssh_remote password $IUM_SFTP_PASS'
/*sh 'ssh ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl -i $IUM_SFTP_KEY'*/
/*sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'*/
2022-05-29 17:17:36 +02:00
echo 'Remote created'
echo 'Pulling from dvc'
sh 'dvc pull'
echo 'Files pulled'
echo 'Running pipeline'
sh 'dvc repro'
echo 'Finished'
}
2022-05-23 10:58:50 +02:00
}
}
}
}