final
All checks were successful
s444452-training/pipeline/head This commit looks good
s444452-evaluation/pipeline/head This commit looks good

This commit is contained in:
AdamOsiowy123 2022-05-04 23:00:44 +02:00
parent c18d43ab24
commit 65e4075f77
2 changed files with 13 additions and 4 deletions

View File

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

View File

@ -20,6 +20,7 @@ node {
} }
stage('Run script') { stage('Run script') {
withEnv(["TRAIN_PARAMS=${params.TRAIN_PARAMS}"]) { withEnv(["TRAIN_PARAMS=${params.TRAIN_PARAMS}"]) {
sh "rm model/neural_net"
sh "python3 Scripts/train_neural_network.py $TRAIN_PARAMS" sh "python3 Scripts/train_neural_network.py $TRAIN_PARAMS"
} }
} }
@ -41,7 +42,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}" 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/${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 ( emailext (