ium_z487175/Jenkinsfile-training

43 lines
1.0 KiB
Plaintext

pipeline{
agent any
parameters {
string(
name: 'EPOCHS',
description: 'Number of epochs',
defaultValue: '10'
)
}
options {
copyArtifactPermission('z-s487175-evaluation.eg');
}
stages{
stage('Copy dataset'){
steps{
sh "docker cp \$(docker ps -l -q):/app/dane ${env.WORKSPACE}"
}
}
stage('Train model'){
steps{
sh "docker run -v ${env.WORKSPACE}/dane:/app/dane ium python3 /app/DL-model.py --epochs ${params.EPOCHS}"
}
}
stage('Archive model'){
steps{
sh "docker cp \$(docker ps -l -q):/app/model_with_data.pickle ${env.WORKSPACE}"
archiveArtifacts artifacts: 'model_with_data.pickle', fingerprint: true
}
}
}
post {
success {
//Wywołanie projektu evaluation
build job: 'z-s487175-evaluation.eg/master', propagate: false
}
}
}