From 47f7fc45e9362b6bb76297a5e49b4254454c8e69 Mon Sep 17 00:00:00 2001 From: piotr6789 Date: Fri, 11 Jun 2021 19:03:42 +0200 Subject: [PATCH] add remote and files --- .dvc/config | 4 ++++ .gitignore | 1 + courses-dvc.csv.dvc | 4 ++++ dvc.yaml | 7 +++++++ dvc/Jenkinsfile | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 courses-dvc.csv.dvc create mode 100644 dvc.yaml create mode 100644 dvc/Jenkinsfile diff --git a/.dvc/config b/.dvc/config index e69de29..3c6eb88 100644 --- a/.dvc/config +++ b/.dvc/config @@ -0,0 +1,4 @@ +[core] + remote = my_local_remote +['remote "my_local_remote"'] + url = /dvcstore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a51a816 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/courses-dvc.csv diff --git a/courses-dvc.csv.dvc b/courses-dvc.csv.dvc new file mode 100644 index 0000000..542d3dc --- /dev/null +++ b/courses-dvc.csv.dvc @@ -0,0 +1,4 @@ +outs: +- md5: fcc5513f58a7ace02694308f2756a444 + size: 2009041 + path: courses-dvc.csv diff --git a/dvc.yaml b/dvc.yaml new file mode 100644 index 0000000..baad6e8 --- /dev/null +++ b/dvc.yaml @@ -0,0 +1,7 @@ +stages: + preprocess: + cmd: python ./init.py + stats: + cmd: python ./stats.py + split: + cmd: ./bash.sh diff --git a/dvc/Jenkinsfile b/dvc/Jenkinsfile new file mode 100644 index 0000000..8563849 --- /dev/null +++ b/dvc/Jenkinsfile @@ -0,0 +1,37 @@ +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' + sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY' + sh "dvc pull" + } + } + } + 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' + } + + } +} \ No newline at end of file