From 45c3c425d21d1a7ddeae4f0c43d1a69793e33826 Mon Sep 17 00:00:00 2001 From: Sheaza Date: Tue, 28 May 2024 21:32:24 +0200 Subject: [PATCH] fix 2 --- Jenkinsfile | 7 ++----- training/Jenkinsfile | 5 +++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 772aca2..63166b8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,11 +30,8 @@ pipeline { } stage('Download dataset') { steps { - withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) { - 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 password $IUM_SFTP_PASS' - sh 'dvc pull' - + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.API_KEY}"]) { + sh "kaggle datasets download -d nikhil7280/student-performance-multiple-linear-regression --unzip" } } } diff --git a/training/Jenkinsfile b/training/Jenkinsfile index db92f16..0d00297 100644 --- a/training/Jenkinsfile +++ b/training/Jenkinsfile @@ -32,7 +32,12 @@ pipeline { } steps { + withCredentials([string(credentialsId: 'ium-sftp-password', variable: 'IUM_SFTP_PASS')]) { + 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 password $IUM_SFTP_PASS' + sh 'dvc pull' sh "chmod +x ./train.py" + } sh "python ./train.py --epochs ${params.EPOCHS}" archiveArtifacts artifacts: 'model.keras', onlyIfSuccessful: true }