2022-04-29 19:17:50 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2022-05-17 21:21:31 +02:00
|
|
|
docker {
|
2022-05-17 21:30:48 +02:00
|
|
|
filename 'Dockerfile'
|
2022-05-17 21:21:31 +02:00
|
|
|
args '-v /mlruns:/mlruns'
|
|
|
|
}
|
2022-04-29 19:17:50 +02:00
|
|
|
}
|
|
|
|
parameters {
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
string(
|
|
|
|
defaultValue: '1000',
|
|
|
|
description: 'Number of epochs',
|
|
|
|
name: 'EPOCHS'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Check out from version control') {
|
|
|
|
steps {
|
2022-04-29 19:56:35 +02:00
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/training_and_evaluation']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
|
2022-04-29 19:17:50 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-17 21:21:31 +02:00
|
|
|
stage('Training') {
|
2022-04-29 19:17:50 +02:00
|
|
|
steps {
|
2022-04-29 19:33:27 +02:00
|
|
|
copyArtifacts filter: '*', projectName:'s444421-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2022-05-17 21:21:31 +02:00
|
|
|
sh 'python training_mlflow.py $EPOCHS'
|
|
|
|
archiveArtifacts artifacts: 'mlruns/**'
|
2022-04-29 19:17:50 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|