ium_444354/Jenkinsfile_evaluation
Adrian Charkiewicz b238956acd
Some checks failed
s444354-training/pipeline/head There was a failure building this commit
s444354-evaluation/pipeline/head There was a failure building this commit
jenkinsfile2
2022-05-06 17:08:30 +02:00

50 lines
1.7 KiB
Plaintext

pipeline {
agent {
dockerfile true
}
parameters{
string(
defaultValue: 'master',
description: 'training branch name',
name: 'TRAINING_BRANCH'
)
password(
defaultValue: '',
description: 'JENKINS password',
name: 'JENKINS_KEY'
)
}
stages {
stage('Copy prev build artifact') {
steps {
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
}
}
}
}
}
stage('Copy') {
steps {
copyArtifacts projectName: 's444354-create-dataset'
copyArtifacts projectName: 's444354-training/$TRAINING_BRANCH'
sh 'python3 ./evaluation.py'
archiveArtifacts 'TRAIN_winequality-red.csv'
sh "ls -la"
}
}
}
post {
always {
emailext body: "${currentBuild.currentResult}", subject: '444354-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}