ium_444501/training.Jenkinsfile

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-05-01 14:20:21 +02:00
pipeline {
agent {
docker {image 'zadanie'}
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
2022-05-01 14:43:24 +02:00
string(
2022-05-01 14:59:44 +02:00
defaultValue: '100',
description: 'number of epochs',
name: 'EPOCH'
2022-05-01 14:43:24 +02:00
)
2022-05-01 14:20:21 +02:00
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Train model') {
steps {
2022-05-01 14:59:44 +02:00
withEnv(["EPOCH=${params.EPOCH}"]) {
sh 'python biblioteki_ml.py $EPOCH'
}
2022-05-01 14:20:21 +02:00
}
}
stage('Archive model') {
steps {
2022-05-01 14:43:24 +02:00
archiveArtifacts artifacts: 'model.pkl, neural_network_prediction_results.csv'
2022-05-01 14:20:21 +02:00
}
}
2022-05-01 17:19:50 +02:00
stage ('Model - evaluation') {
steps {
2022-05-01 17:42:01 +02:00
build job: 's444501-evaluation/master', parameters: [[$class: 'PT_BRANCH', name: 'BRANCH', value: "master"]], wait: false
2022-05-01 17:19:50 +02:00
}
}
2022-05-01 14:20:21 +02:00
}
2022-05-01 14:43:24 +02:00
post {
always {
emailext body: "${currentBuild.currentResult}", subject: 's444501-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
2022-05-01 14:20:21 +02:00
}