copy artifact
This commit is contained in:
parent
73f4dfcbd9
commit
fb1007288b
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user