IUM_s464980/Jenkinsfile
2024-03-26 18:45:26 +01:00

42 lines
1.2 KiB
Groovy

pipeline {
agent any
parameters {
string (
name: 'KAGGLE_USERNAME',
defaultValue: 'ardenw',
description: 'Kaggle username'
)
password (
name: 'KAGGLE_KEY',
defaultValue: '',
description: 'Kaggle API key'
)
string (
name: 'DATA_TRAIN_RATIO',
defaultValue: '80',
description: 'Train data ratio percentage'
)
string (
name: 'CUTOFF',
defaultValue: '500',
description: 'Cutoff value'
)
}
stages {
stage('Checkout repository') {
steps {
checkout scm
}
}
stage('Download dataset') {
steps {
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}"]) {
sh "chmod +x download_dataset.sh"
sh "./download_dataset.sh $DATA_TRAIN_RATIO"
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true
}
}
}
}
}