fix
Some checks failed
s444452-training/pipeline/head This commit looks good
s444452-evaluation/pipeline/head There was a failure building this commit

This commit is contained in:
AdamOsiowy123 2022-05-04 19:27:40 +02:00
parent 82e28c8c59
commit f4a0241079
2 changed files with 9 additions and 9 deletions

View File

@ -12,10 +12,10 @@ node {
name: 'BRANCH', name: 'BRANCH',
type: 'PT_BRANCH' type: 'PT_BRANCH'
), ),
string( buildSelector(
defaultValue: "0", defaultSelector: upstream(),
description: 'BUILD_NR', description: 'Which build to use for copying artifacts',
name: 'BUILD_NR' name: 'BUILD_SELECTOR'
), ),
string( string(
defaultValue: ".,14000,1,50,100", defaultValue: ".,14000,1,50,100",
@ -30,15 +30,15 @@ node {
copyArtifacts filter: 'test_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset' copyArtifacts filter: 'test_data.csv', fingerprintArtifacts: true, projectName: 's444452-create-dataset'
git branch: "${params.BRANCH}", url: 'https://git.wmi.amu.edu.pl/s444452/ium_444452.git' git branch: "${params.BRANCH}", url: 'https://git.wmi.amu.edu.pl/s444452/ium_444452.git'
copyArtifacts filter: 'neural_network_evaluation.csv', projectName: "s444452-evaluation/${BRANCH}/", optional: true copyArtifacts filter: 'neural_network_evaluation.csv', projectName: "s444452-evaluation/${BRANCH}/", optional: true
copyArtifacts filter: 'model/neural_net', projectName: "s444452-training/${BRANCH}/" copyArtifacts filter: 'model/neural_net', projectName: "s444452-training/${BRANCH}/", selector: buildParameter('BUILD_SELECTOR')
} }
stage('Run script') { stage('Run script') {
withEnv(["TEST_PARAMS=${params.TEST_PARAMS}"]) { withEnv(["TEST_PARAMS=${params.TEST_PARAMS}", "BUILD_NR=${params.BUILD_SELECTOR}"]) {
sh "python3 Scripts/evaluate_neural_network.py ${params.BUILD_NR} $TEST_PARAMS" sh "python3 Scripts/evaluate_neural_network.py $BUILD_NR $TEST_PARAMS"
} }
} }
stage('Archive artifacts') { stage('Archive artifacts') {
archiveArtifacts "neural_network_evaluation.csv, evaluation.png" archiveArtifacts "neural_network_evaluation.csv, evaluation.png", onlyIfSuccessful: true
} }
} }
} catch (e) { } catch (e) {

View File

@ -41,7 +41,7 @@ def notifyBuild(String buildStatus = 'STARTED') {
def details = "Build nr: ${env.BUILD_NUMBER}, status: ${buildStatus} \n url: ${env.BUILD_URL} \n build params: ${params.TRAIN_PARAMS}" def details = "Build nr: ${env.BUILD_NUMBER}, status: ${buildStatus} \n url: ${env.BUILD_URL} \n build params: ${params.TRAIN_PARAMS}"
if (buildStatus == 'SUCCESS') { if (buildStatus == 'SUCCESS') {
build job: 's444452-evaluation', parameters: [gitParameter(name: "BRANCH", value: "${env.BRANCH_NAME}"), string(name: "TEST_PARAMS", value: "${params.TRAIN_PARAMS}"), string(name: "BUILD_NR", value: "${env.BUILD_NR}")], wait: false build job: 's444452-evaluation/master', parameters: [string(name: "TEST_PARAMS", value: "${params.TRAIN_PARAMS}")], wait: false
} }
emailext ( emailext (