ium_444421/training.Jenkinsfile
2022-05-22 12:06:12 +02:00

38 lines
1.1 KiB
Plaintext

pipeline {
agent {
dockerfile {
filename 'Dockerfile'
args '-v /mlruns:/mlruns'
}
}
options {
copyArtifactPermission('s444421-predict-s444501');
}
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 {
checkout([$class: 'GitSCM', branches: [[name: '*/training_and_evaluation']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]])
}
}
stage('Training') {
steps {
copyArtifacts filter: '*', projectName:'s444421-create-dataset', selector: buildParameter('BUILD_SELECTOR')
sh 'ipython ./training_mlflow.py $EPOCHS'
archiveArtifacts artifacts: 'mlruns/*'
}
}
}
}