45 lines
1.2 KiB
Plaintext
45 lines
1.2 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}"
|
|
sh "ls ${env.WORKSPACE}"
|
|
sh "docker cp \$(docker ps -l -q):/app/artifacts-sacred ${env.WORKSPACE}"
|
|
archiveArtifacts artifacts: 'model_with_data.pickle, artifacts-sacred/**', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
success {
|
|
//Wywołanie projektu evaluation
|
|
build job: 'z-s487175-evaluation.eg/master', propagate: false, wait: false
|
|
}
|
|
}
|
|
} |