This commit is contained in:
AdamOsiowy123 2022-05-04 20:13:33 +02:00
parent 66c61839e9
commit 7fef24cb5f
1 changed files with 5 additions and 6 deletions

View File

@ -38,16 +38,13 @@ node {
copyArtifacts filter: 'model/neural_net', projectName: "s444452-training/${BRANCH}/", selector: buildParameter('BUILD_SELECTOR')
}
stage('Run script') {
withEnv(["TEST_PARAMS=${params.TEST_PARAMS}"]) {
sh "python3 Scripts/evaluate_neural_network.py ${params.BUILD_NR} $TEST_PARAMS"
withEnv(["TEST_PARAMS=${params.TEST_PARAMS}", "BUILD_NR=${params.BUILD_NR}"]) {
sh "python3 Scripts/evaluate_neural_network.py $BUILD_NR $TEST_PARAMS"
}
}
stage('Archive artifacts') {
archiveArtifacts "neural_network_evaluation.csv, evaluation.png"
}
stage('Echo branch') {
sh "echo ${params.BRANCH}"
}
}
} catch (e) {
currentBuild.result = "FAILED"
@ -60,7 +57,9 @@ 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.TEST_PARAMS}"
def lines= new File("./neural_network_evaluation.csv").readLines()
def lastline=lines.get(lines.size()-1)
def details = "Build nr: ${env.BUILD_NUMBER}, status: ${buildStatus} \n url: ${env.BUILD_URL} \n build params: ${params.TEST_PARAMS} \n metrics: ${lastline}"
emailext (
subject: subject,