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(
|
|
|
|
defaultValue: '10',
|
|
|
|
description: 'some training parameter',
|
2022-05-01 14:48:17 +02:00
|
|
|
name: 'TRAINING_PARAM'
|
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:48:17 +02:00
|
|
|
sh 'python biblioteki_ml.py ${params.TRAINING_PARAM}'
|
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 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
|
|
|
}
|