ium_464913/Jenkinsfile
2024-05-04 10:40:09 +02:00

40 lines
850 B
Groovy

pipeline {
agent {
dockerfile true
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Clone Repository') {
steps {
git branch: 'training', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts filter: 'data/*', projectName: 'z-s464913-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Run train_model script') {
steps {
sh 'chmod +x train_model.py'
sh 'python3 ./train_model.py'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts artifacts: 'model/*', onlyIfSuccessful: true
}
}
}
}