2024-05-14 22:04:38 +02:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
parameters {
|
|
|
|
buildSelector (
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
2024-05-14 22:47:47 +02:00
|
|
|
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH', type: 'PT_BRANCH'
|
2024-05-14 22:04:38 +02:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Checkout repository') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Copy artifacts') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2024-05-14 22:50:24 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's464980-training/${params.BRANCH}', selector: buildParameter('BUILD_SELECTOR')
|
2024-05-14 22:53:52 +02:00
|
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 's464980-evaluation/"${params.BRANCH}"', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
2024-05-14 22:04:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("Prediction") {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
sh "chmod +x ./predict.py"
|
|
|
|
sh "python ./predict.py"
|
2024-05-14 22:46:23 +02:00
|
|
|
archiveArtifacts artifacts: 'predictions.txt,rmse.txt,rmse.jpg', onlyIfSuccessful: true
|
2024-05-14 22:04:38 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|