IUM_s464980/Jenkinsfile
Sheaza bc60e9bee2
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
add training pipeline
2024-05-14 21:26:05 +02:00

53 lines
1.5 KiB
Groovy

pipeline {
agent any
parameters {
string (
name: 'KAGGLE_USERNAME',
defaultValue: 'ardenw',
description: 'Kaggle username'
)
password (
name: 'API_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(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.API_KEY}"]) {
sh "kaggle datasets download -d nikhil7280/student-performance-multiple-linear-regression --unzip"
}
}
}
stage('Prepare dataset') {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
sh "chmod +x ./get_dataset.py"
sh "python ./get_dataset.py"
archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
}
}
}