This commit is contained in:
Andrzej Preibisz 2022-03-27 14:59:01 +02:00
parent 58c31c3a9f
commit a22b4cc571
2 changed files with 22 additions and 3 deletions

21
Jenkinsfile vendored
View File

@ -12,12 +12,31 @@ node {
defaultValue: "10000",
description: "How many records use",
name: "CUTOFF"
),
string (
defaultValue: 'andrzejpreibisz',
description: 'Kaggle username',
name: 'KAGGLE_USERNAME',
trim: false
),
password(
defaultValue: '',
description: 'Kaggle token key',
name: 'KAGGLE_KEY'
)
])
])
}
stage("Git clone"){
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]])
}
stage('Download') {
sh "dataset_script.sh \"${CUTOFF}\""
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=${params.CUTOFF}"]) {
sh "chmod 777 dataset_script.sh"
sh "./dataset_script.sh $CUTOFF"
}
}
stage('Goodbye') {
echo 'Goodbye!'

View File

@ -5,8 +5,8 @@ TEST_SIZE=$(($CUTOFF * 1/5))
TRAIN_START=$(($TEST_SIZE+1))
echo $TEST_SIZE
echo $TRAIN_START
! kaggle datasets download kamilpytlak/personal-key-indicators-of-heart-disease
echo $KAGGLE_USERNAME
kaggle datasets download -d kamilpytlak/personal-key-indicators-of-heart-disease --force
! unzip personal-key-indicators-of-heart-disease -d ./
! wc -l heart_2020_cleaned.csv