IUM_s464980/evaluate/Jenkinsfile
2024-05-14 22:17:35 +02:00

37 lines
1.1 KiB
Groovy

pipeline {
agent any
parameters {
buildSelector (
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Checkout repository') {
steps {
checkout scm
}
}
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR')
copyArtifacts fingerprintArtifacts: true, projectName: 's464980-training/master', selector: buildParameter('BUILD_SELECTOR')
}
}
stage("Prediction") {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
sh "chmod +x ./predict.py"
sh "python ./predict.py"
archiveArtifacts artifacts: 'predictions.txt,accuracy.txt', onlyIfSuccessful: true
}
}
}
}