2022-05-03 22:12:13 +02:00
|
|
|
pipeline {
|
2022-05-06 17:08:30 +02:00
|
|
|
agent {
|
|
|
|
dockerfile true
|
2022-05-03 22:12:13 +02:00
|
|
|
}
|
2022-05-06 17:08:30 +02:00
|
|
|
parameters{
|
|
|
|
string(
|
|
|
|
defaultValue: 'master',
|
|
|
|
description: 'training branch name',
|
|
|
|
name: 'TRAINING_BRANCH'
|
|
|
|
)
|
|
|
|
password(
|
|
|
|
defaultValue: '',
|
|
|
|
description: 'JENKINS password',
|
|
|
|
name: 'JENKINS_KEY'
|
|
|
|
)
|
2022-05-03 22:12:13 +02:00
|
|
|
}
|
|
|
|
stages {
|
2022-05-06 17:08:30 +02:00
|
|
|
stage('Copy prev build artifact') {
|
2022-05-03 22:12:13 +02:00
|
|
|
steps {
|
2022-05-06 17:08:30 +02:00
|
|
|
script {
|
|
|
|
if (currentBuild.previousBuild) {
|
|
|
|
try {
|
|
|
|
copyArtifacts(projectName: currentBuild.projectName,
|
|
|
|
selector: specific("${currentBuild.previousBuild.number}"))
|
|
|
|
def previousFile = readFile(file: "TRAIN_winequality-red.csv")
|
|
|
|
echo("The current build is ${currentBuild.number}")
|
|
|
|
echo("The previous build artifact was: ${previousFile}")
|
|
|
|
} catch(err) {
|
|
|
|
// ignore error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-05-03 22:12:13 +02:00
|
|
|
}
|
|
|
|
}
|
2022-05-06 17:08:30 +02:00
|
|
|
stage('Copy') {
|
2022-05-03 22:12:13 +02:00
|
|
|
steps {
|
2022-05-06 17:08:30 +02:00
|
|
|
copyArtifacts projectName: 's444354-create-dataset'
|
|
|
|
copyArtifacts projectName: 's444354-training/$TRAINING_BRANCH'
|
|
|
|
sh 'python3 ./evaluation.py'
|
2022-05-07 05:21:27 +02:00
|
|
|
archiveArtifacts 'eval.csv, metrics.png'
|
2022-05-07 04:46:30 +02:00
|
|
|
|
2022-05-03 22:12:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-05-06 17:08:30 +02:00
|
|
|
emailext body: "${currentBuild.currentResult}", subject: '444354-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
|
2022-05-03 22:12:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|