IUM_s464980/Jenkinsfile
Sheaza 45c3c425d2
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
fix 2
2024-05-28 21:32:24 +02:00

61 lines
1.6 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
}
}
stage('Run training'){
steps{
script {
build(job: 's464980-training/master')
}
}
}
}
}