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 22:46:44 +02:00
parent 0a1cfb067c
commit 3e7986c73a
2 changed files with 13 additions and 3 deletions

View File

@ -33,11 +33,13 @@ node {
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'
copyArtifacts filter: 'neural_network_evaluation.csv', projectName: "s444452-evaluation/${env.BRANCH_NAME}", optional: true
copyArtifacts filter: 'model/neural_net', projectName: "s444452-training/${env.BRANCH_NAME}", selector: buildParameter('BUILD_SELECTOR')
copyArtifacts filter: 'neural_network_evaluation.csv', projectName: "s444452-evaluation/${params.BRANCH}", optional: true
copyArtifacts filter: 'model/neural_net', projectName: "s444452-training/${params.BRANCH}", selector: buildParameter('BUILD_SELECTOR')
}
stage('Run script') {
withEnv(["TEST_PARAMS=${params.TEST_PARAMS}", "BUILD_NR=${params.BUILD_NR}"]) {
sh "rm neural_network_evaluation.csv"
sh "rm model/neural_net"
sh "python3 Scripts/evaluate_neural_network.py $BUILD_NR $TEST_PARAMS"
}
}

View File

@ -41,7 +41,15 @@ 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}"
if (buildStatus == 'SUCCESS') {
build job: "s444452-evaluation/${env.BRANCH_NAME}", parameters: [string(name: "TEST_PARAMS", value: "${params.TRAIN_PARAMS}"), string(name: "BUILD_NR", value: "${env.BUILD_NUMBER}")], wait: false
build (
job: "s444452-evaluation/${env.BRANCH_NAME}",
parameters: [
gitParameter(name: "BRANCH", value: "${env.BRANCH_NAME}"),
string(name: "TEST_PARAMS", value: "${params.TRAIN_PARAMS}"),
string(name: "BUILD_NR", value: "${env.BUILD_NUMBER}")
],
wait: false
)
}
emailext (