ium_444501/training.Jenkinsfile
s444501 0a5a3c3979
All checks were successful
s444501-training/pipeline/head This commit looks good
s444501-evaluation/pipeline/head This commit looks good
mongo poprawka
2022-05-11 16:22:33 +02:00

48 lines
1.2 KiB
Plaintext

pipeline {
agent {
docker {image 'zadanie'}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(
defaultValue: '100',
description: 'number of epochs',
name: 'EPOCH'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Train model') {
steps {
withEnv(["EPOCH=${params.EPOCH}"]) {
sh 'python biblioteki_ml.py with "epochs=$EPOCH"'
}
}
}
stage('Archive artifacts') {
steps {
archiveArtifacts artifacts: 'model.pkl, neural_network_prediction_results.csv'
archiveArtifacts artifacts: 'my_runs/**'
}
}
stage ('Model - evaluation') {
steps {
build job: 's444501-evaluation/master', wait: false
}
}
}
post {
always {
emailext body: "${currentBuild.currentResult}", subject: 's444501-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}