ium_464979/Jenkinsfile

40 lines
1.4 KiB
Plaintext
Raw Normal View History

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-05-05 19:01:35 +02:00
triggers {
upstream(upstreamProjects: 'z-s464979-create-datase', threshold: hudson.model.Result.SUCCESS)
}
2024-04-02 22:53:09 +02:00
parameters {
2024-05-05 19:01:35 +02:00
string(name: 'EPOCHS', defaultValue: '40', description: 'Number of epochs')
string(name: 'BATCH_SIZE', defaultValue: '32', description: 'Batch size')
2024-05-05 18:56:31 +02:00
buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR')
2024-04-02 22:53:09 +02:00
}
stages {
stage('Clone Repository') {
steps {
2024-05-05 18:56:31 +02:00
git branch: 'training', url: "https://git.wmi.amu.edu.pl/s464979/ium_464979.git"
}
}
2024-05-05 18:56:31 +02:00
stage('Copy Artifacts') {
2024-04-02 22:47:08 +02:00
steps {
2024-05-05 18:56:31 +02:00
copyArtifacts filter: 'beer_reviews.csv,beer_reviews_train.csv,beer_reviews_test.csv', projectName: 'z-s464979-create-datase', selector: buildParameter('BUILD_SELECTOR')
2024-04-16 18:58:43 +02: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"
2024-05-05 19:01:35 +02:00
sh "python3 ./IUM_05-model.py ${params.EPOCHS} ${params.BATCH_SIZE}"
2024-05-05 18:56:31 +02:00
archiveArtifacts artifacts: 'beer_review_sentiment_model.h5', onlyIfSuccessful: true
2024-03-24 18:54:40 +01:00
}
}
}
}