2024-03-20 14:35:23 +01:00
|
|
|
pipeline {
|
2024-05-06 09:17:27 +02:00
|
|
|
agent {
|
|
|
|
dockerfile true
|
2024-04-02 22:53:09 +02:00
|
|
|
}
|
|
|
|
|
2024-05-06 09:17:27 +02:00
|
|
|
triggers {
|
|
|
|
upstream(upstreamProjects: 's464979-training/training', threshold: hudson.model.Result.SUCCESS)
|
|
|
|
}
|
|
|
|
|
|
|
|
parameters {
|
|
|
|
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
|
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'training', name: 'BRANCH', type: 'PT_BRANCH'
|
|
|
|
}
|
|
|
|
|
2024-03-24 14:39:33 +01:00
|
|
|
stages {
|
|
|
|
stage('Clone Repository') {
|
|
|
|
steps {
|
2024-05-06 09:17:27 +02:00
|
|
|
git branch: 'evaluation', url: "https://git.wmi.amu.edu.pl/s464979/ium_464979"
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-06 09:17:27 +02:00
|
|
|
stage('Copy Dataset Artifacts') {
|
2024-04-02 22:47:08 +02:00
|
|
|
steps {
|
2024-05-06 09:17:27 +02:00
|
|
|
copyArtifacts filter: 'beer_reviews.csv,beer_reviews_train.csv,beer_reviews_test.csv', projectName: 'z-s464979-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2024-04-16 18:58:43 +02:00
|
|
|
}
|
|
|
|
}
|
2024-05-06 09:17:27 +02:00
|
|
|
stage('Copy Training Artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts filter: 'beer_review_sentiment_model.h5', projectName: 's464979-training/' + params.BRANCH, selector: buildParameter('BUILD_SELECTOR')
|
|
|
|
}
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|
2024-05-06 09:17:27 +02:00
|
|
|
stage('Copy Evaluation Artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts filter: 'beer_metrics.txt', projectName: '_s464979-evaluation/evaluation', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Run predictions") {
|
2024-03-24 18:54:40 +01:00
|
|
|
steps {
|
2024-04-16 18:58:43 +02:00
|
|
|
sh "chmod +x ./IUM_05-predict.py"
|
2024-04-16 19:05:15 +02:00
|
|
|
sh "python3 ./IUM_05-predict.py"
|
2024-05-06 09:17:27 +02:00
|
|
|
archiveArtifacts artifacts: 'beer_review_sentiment_predictions.csv', onlyIfSuccessful: true
|
2024-03-24 18:54:40 +01:00
|
|
|
}
|
2024-03-24 18:40:11 +01:00
|
|
|
}
|
2024-05-06 09:17:27 +02:00
|
|
|
stage('Run metrics') {
|
|
|
|
steps {
|
|
|
|
sh 'chmod +x ./IUM_06-metrics.py'
|
|
|
|
sh "python3 ./IUM_06-metrics.py ${currentBuild.number}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Run plot') {
|
|
|
|
steps {
|
|
|
|
sh 'chmod +x ./IUM_06-plot.py'
|
|
|
|
sh 'python3 ./IUM_06-plot.py'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive Artifacts') {
|
|
|
|
steps {
|
|
|
|
archiveArtifacts artifacts: '*', onlyIfSuccessful: true
|
|
|
|
}
|
|
|
|
}
|
2024-03-24 18:40:11 +01:00
|
|
|
}
|
2024-03-24 14:39:33 +01:00
|
|
|
}
|