53 lines
1.8 KiB
Groovy
53 lines
1.8 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
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')
|
|
}
|
|
|
|
stages {
|
|
stage('Clone Repository') {
|
|
steps {
|
|
git url: "https://git.wmi.amu.edu.pl/s464979/ium_464979"
|
|
}
|
|
}
|
|
stage('Download dataset') {
|
|
steps {
|
|
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
|
|
}
|
|
}
|
|
steps {
|
|
sh "chmod +x ./IUM_05-split.py"
|
|
sh "python3 ./IUM_05-split.py"
|
|
archiveArtifacts artifacts: 'beer_reviews.csv,beer_reviews_train.csv,beer_reviews_test.csv', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
stage("Run") {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
sh "chmod +x ./IUM_05-model.py"
|
|
sh "chmod +x ./IUM_05-predict.py"
|
|
sh "python3 ./IUM_05-model.py"
|
|
sh "python3 ./IUM_05-predict.py"
|
|
archiveArtifacts artifacts: 'beer_review_sentiment_model.h5,beer_review_sentiment_predictions.csv', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|