ium_444452/Jenkins/Jenkinsfile.evaluation
AdamOsiowy123 8fa7f68080
Some checks failed
s444452-evaluation/pipeline/head There was a failure building this commit
s444452-training/pipeline/head This commit looks good
evaluate
2022-05-03 00:04:19 +02:00

48 lines
1.6 KiB
Plaintext

node {
checkout scm
try {
docker.image('s444452/ium:1.3').inside {
stage('Preparation') {
properties([
pipelineTriggers([upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: "s444452-training")]),
parameters([
string(
defaultValue: ".,14000,100",
description: 'Test params: data_path,num_words,pad_length',
name: 'TEST_PARAMS'
)
])
])
}
stage('Copy artifacts') {
copyArtifacts filter: 'train_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
copyArtifacts filter: 'test_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
}
stage('Run script') {
withEnv(["TEST_PARAMS=${params.TEST_PARAMS}"]) {
sh "python3 Scripts/evaluate_neural_network.py $TEST_PARAMS"
}
}
stage('Archive artifacts') {
archiveArtifacts "neural_network_evaluation.txt"
}
}
} catch (e) {
currentBuild.result = "FAILED"
throw e
} finally {
notifyBuild(currentBuild.result)
}
}
def notifyBuild(String buildStatus = 'STARTED') {
buildStatus = buildStatus ?: 'SUCCESS'
def subject = "Job: ${env.JOB_NAME}"
def details = "Build nr: ${env.BUILD_NUMBER}, status: ${buildStatus} \n url: ${env.BUILD_URL} \n build params: ${params.TRAIN_PARAMS}"
emailext (
subject: subject,
body: details,
to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
)
}