fix data downloading

This commit is contained in:
Karol Cyganik 2024-04-14 14:25:13 +02:00
parent 5d2a5fc9a4
commit 3d58aca307

View File

@ -30,6 +30,23 @@ pipeline {
git branch: 'main', url: 'https://git.wmi.amu.edu.pl/s495715/iumKC.git'
}
}
stage('Download Dataset') {
steps {
script {
def datasetDir = 'football_dataset'
def downloadDir = 'football_dataset_download'
if (!fileExists(downloadDir)) {
sh "mkdir ${downloadDir}"
}
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "kaggle datasets download sadhliroomyprime/football-semantic-segmentation -p ${downloadDir}"
sh "unzip ${downloadDir}/*.zip -d ${datasetDir}"
}
}
}
}
stage('Copy Artifacts') {
steps {
script {