2024-03-20 14:35:23 +01:00
|
|
|
pipeline {
|
2024-04-16 18:58:43 +02:00
|
|
|
agent any
|
2024-04-02 23:13:26 +02:00
|
|
|
|
2024-04-02 22:53:09 +02:00
|
|
|
parameters {
|
|
|
|
string(name: 'CUTOFF', defaultValue: '10000', description: 'Liczba wierszy do obcięcia ze zbioru danych')
|
|
|
|
string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username')
|
|
|
|
password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key')
|
|
|
|
}
|
|
|
|
|
2024-03-24 14:39:33 +01:00
|
|
|
stages {
|
|
|
|
stage('Clone Repository') {
|
|
|
|
steps {
|
2024-03-24 19:10:02 +01:00
|
|
|
git url: "https://git.wmi.amu.edu.pl/s464979/ium_464979"
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|
|
|
|
}
|
2024-04-16 18:58:43 +02:00
|
|
|
stage('Download dataset') {
|
2024-04-02 22:47:08 +02:00
|
|
|
steps {
|
2024-04-16 18:58:43 +02:00
|
|
|
withEnv(["KAGGLE_USERNAME=${env.KAGGLE_USERNAME}", "KAGGLE_KEY=${env.KAGGLE_KEY}"]) {
|
|
|
|
sh "kaggle datasets download -d thedevastator/1-5-million-beer-reviews-from-beer-advocate --unzip"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Process and Split Dataset') {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
2024-04-02 22:47:08 +02:00
|
|
|
}
|
|
|
|
}
|
2024-04-16 18:58:43 +02:00
|
|
|
steps {
|
|
|
|
sh "chmod +x ./IUM_05-split.py"
|
|
|
|
sh "python ./IUM_05-split.py"
|
|
|
|
archiveArtifacts artifacts: 'beer_reviews.csv,beer_reviews_train.csv,beer_reviews_test.csv', onlyIfSuccessful: true
|
|
|
|
}
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|
2024-04-16 18:58:43 +02:00
|
|
|
stage("Run") {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
2024-03-24 18:54:40 +01:00
|
|
|
steps {
|
2024-04-16 18:58:43 +02:00
|
|
|
sh "chmod +x ./IUM_05-model.py"
|
|
|
|
sh "chmod +x ./IUM_05-predict.py"
|
|
|
|
sh "python ./IUM_05-model.py"
|
|
|
|
sh "python ./IUM_05-predict.py"
|
|
|
|
archiveArtifacts artifacts: 'beer_review_sentiment_model.h5,beer_review_sentiment_predictions.csv', onlyIfSuccessful: true
|
2024-03-24 18:54:40 +01:00
|
|
|
}
|
2024-03-24 18:40:11 +01:00
|
|
|
}
|
|
|
|
}
|
2024-03-24 18:54:40 +01:00
|
|
|
// post {
|
|
|
|
// always {
|
|
|
|
// deleteDir()
|
|
|
|
// }
|
|
|
|
// }
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|