2024-03-20 14:34:00 +01:00
|
|
|
pipeline {
|
2024-04-02 14:15:40 +02:00
|
|
|
agent any
|
2024-04-29 21:09:13 +02:00
|
|
|
parameters {
|
|
|
|
buildSelector (
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Build for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
)
|
|
|
|
}
|
2024-03-20 14:34:00 +01:00
|
|
|
stages {
|
2024-04-02 19:05:02 +02:00
|
|
|
stage('Git Checkout') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
2024-04-29 21:02:47 +02:00
|
|
|
stage('Copy Artifacts') {
|
|
|
|
steps {
|
2024-04-30 16:03:02 +02:00
|
|
|
copyArtifacts filter: '*', projectName: 's464914-training/experiments/', selector: buildParameter('BUILD_SELECTOR')
|
2024-04-29 21:02:47 +02:00
|
|
|
}
|
2024-04-02 19:36:23 +02:00
|
|
|
}
|
2024-04-30 16:03:02 +02:00
|
|
|
stage('Prediction') {
|
2024-04-14 12:58:46 +02:00
|
|
|
steps {
|
2024-04-14 13:03:36 +02:00
|
|
|
script {
|
2024-04-14 12:58:46 +02:00
|
|
|
def customImage = docker.build("custom-image")
|
|
|
|
customImage.inside {
|
2024-04-30 16:03:02 +02:00
|
|
|
sh 'python3 ./prediction.py'
|
|
|
|
archiveArtifacts artifacts: 'predictions.txt', onlyIfSuccessful: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Metrics') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
def customImage = docker.build("custom-image")
|
|
|
|
customImage.inside {
|
|
|
|
sh 'python3 ./metrics.py'
|
|
|
|
archiveArtifacts artifacts: 'metrics.txt', onlyIfSuccessful: true
|
2024-04-14 12:58:46 +02:00
|
|
|
}
|
2024-04-14 13:03:36 +02:00
|
|
|
}
|
2024-04-14 12:58:46 +02:00
|
|
|
}
|
|
|
|
}
|
2024-04-29 21:22:42 +02:00
|
|
|
}
|
|
|
|
}
|