ium_444417/Jenkinsfile.eval

50 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-05-03 20:47:24 +02:00
pipeline {
2022-05-03 22:12:57 +02:00
agent {
dockerfile true
}
2022-05-04 15:54:17 +02:00
parameters{
string(
defaultValue: 's444417',
description: 'JENKINS username',
name: 'JENKINS_USERNAME'
)
password(
defaultValue: '',
description: 'JENKINS password',
name: 'JENKINS_KEY'
)
}
2022-05-03 20:47:24 +02:00
stages {
2022-05-03 22:54:23 +02:00
stage('Copy prev build artifact') {
steps {
script {
if (currentBuild.previousBuild) {
try {
copyArtifacts(projectName: currentBuild.projectName,
selector: specific("${currentBuild.previousBuild.number}"))
def previousFile = readFile(file: "trainResults.csv")
echo("The current build is ${currentBuild.number}")
echo("The previous build artifact was: ${previousFile}")
} catch(err) {
// ignore error
}
}
}
}
}
2022-05-03 20:47:24 +02:00
stage('Copy') {
steps {
2022-05-04 16:49:47 +02:00
copyArtifacts projectName: 's444417-create-dataset'
2022-05-03 22:15:12 +02:00
copyArtifacts projectName: 's444417-training/master'
2022-05-03 22:16:47 +02:00
sh 'python3 ./src/evalScript.py'
2022-05-03 21:45:42 +02:00
archiveArtifacts 'trainResults.csv'
2022-05-03 22:54:23 +02:00
sh "ls -la"
2022-05-03 21:45:42 +02:00
}
}
2022-05-03 20:47:24 +02:00
}
post {
always {
emailext body: "${currentBuild.currentResult}", subject: 's444417-evaluation build status', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms'
}
}
}