ium_464962/Jenkinsfile

48 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-03-26 10:43:23 +01:00
pipeline {
2024-05-13 20:10:55 +02:00
agent {
dockerfile true
2024-03-30 17:47:27 +01:00
}
2024-03-26 22:14:47 +01:00
parameters {
string(
defaultValue: '10000',
2024-05-13 20:10:55 +02:00
name: 'CUTOFF',
2024-03-26 22:14:47 +01:00
description: 'Liczba wierszy do obcięcia ze zbioru danych')
string(
defaultValue: '',
2024-05-13 20:10:55 +02:00
name: 'KAGGLE_USERNAME',
2024-03-26 22:14:47 +01:00
description: 'Kaggle username')
password(
defaultValue: '',
2024-05-13 20:10:55 +02:00
name: 'KAGGLE_KEY',
description: 'Kaggle API key')
2024-03-26 22:14:47 +01:00
}
stages {
stage('Clone Repository') {
steps {
2024-03-26 23:04:58 +01:00
checkout([$class: 'GitSCM', branches: [[name: '*/main']], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s464962/ium_464962']]])
2024-03-26 22:14:47 +01:00
}
}
2024-03-26 22:14:47 +01:00
stage('Download') {
steps {
withEnv([
2024-05-13 20:10:55 +02:00
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
2024-03-26 22:14:47 +01:00
"KAGGLE_KEY=${env.KAGGLE_KEY}"
]) {
sh "bash ./create-dataset.sh ${params.CUTOFF}"
}
}
}
2024-05-05 22:31:51 +02:00
stage('Train and predict') {
steps {
sh "chmod +x ./model.py"
sh "chmod +x ./predict.py"
sh "python ./model.py"
2024-05-05 22:43:11 +02:00
sh "python ./predict.py"
2024-05-08 23:52:58 +02:00
archiveArtifacts artifacts: 'car_prices_predict_model.h5, predicted_selling_prices.csv', onlyIfSuccessful: true
2024-05-05 22:31:51 +02:00
}
}
2024-03-26 22:14:47 +01:00
}
}