From 93fa20b79342cffec61388c812bf96cc490a38e2 Mon Sep 17 00:00:00 2001 From: Andrzej Preibisz Date: Sun, 29 May 2022 15:07:06 +0200 Subject: [PATCH] DVC Jenkins fix --- .dvc/config | 2 +- Jenkinsfile.dvc_repo | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Jenkinsfile.dvc_repo diff --git a/.dvc/config b/.dvc/config index c02d6a2..ce375a8 100644 --- a/.dvc/config +++ b/.dvc/config @@ -1,4 +1,4 @@ [core] remote = ium_ssh_remote ['remote "ium_ssh_remote"'] - url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl/ium-sftp + url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl diff --git a/Jenkinsfile.dvc_repo b/Jenkinsfile.dvc_repo new file mode 100644 index 0000000..b3756e1 --- /dev/null +++ b/Jenkinsfile.dvc_repo @@ -0,0 +1,29 @@ +pipeline { + agent { + dockerfile true + } + parameters { + string( + defaultValue: "10", + description: 'Number of epochs in training', + name: 'NO_OF_EPOCHS' + ) + } + stages { + stage("Git clone") { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]]) + } + } + stage("Run DVC") { + steps { + withCredentials( + [sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: '')]) { + 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' + sh 'dvc pull' + } + } + } + } +} \ No newline at end of file