copy artifact
All checks were successful
s444417-evaluation/pipeline/head This commit looks good
s444417-training/pipeline/head This commit looks good

This commit is contained in:
s444417 2022-05-03 22:54:23 +02:00
parent 73f4dfcbd9
commit fb1007288b

View File

@ -3,12 +3,29 @@ pipeline {
dockerfile true dockerfile true
} }
stages { 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: "trainResults.csv")
echo("The current build is ${currentBuild.number}")
echo("The previous build artifact was: ${previousFile}")
} catch(err) {
// ignore error
}
}
}
}
}
stage('Copy') { stage('Copy') {
steps { steps {
copyArtifacts projectName: 's444417-training/master' copyArtifacts projectName: 's444417-training/master'
sh "ls -la"
sh 'python3 ./src/evalScript.py' sh 'python3 ./src/evalScript.py'
archiveArtifacts 'trainResults.csv' archiveArtifacts 'trainResults.csv'
sh "ls -la"
} }
} }
} }