2024-04-01 16:14:55 +02:00
|
|
|
pipeline {
|
2024-05-04 15:25:54 +02:00
|
|
|
agent {
|
|
|
|
dockerfile true
|
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
upstream(upstreamProjects: 's464913-training/training', threshold: hudson.model.Result.SUCCESS)
|
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
|
|
|
|
parameters {
|
2024-05-04 15:25:54 +02:00
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: 'Which build to use for copying artifacts',
|
|
|
|
name: 'BUILD_SELECTOR'
|
2024-03-24 11:31:18 +01:00
|
|
|
)
|
|
|
|
}
|
2024-03-24 12:13:05 +01:00
|
|
|
|
2024-04-01 18:03:42 +02:00
|
|
|
stages {
|
2024-04-01 18:04:49 +02:00
|
|
|
stage('Clone Repository') {
|
|
|
|
steps {
|
2024-05-04 15:25:54 +02:00
|
|
|
git branch: 'evaluation', url: 'https://git.wmi.amu.edu.pl/s464913/ium_464913.git'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Copy Artifacts from dataset job') {
|
|
|
|
steps {
|
|
|
|
copyArtifacts filter: 'data/*', projectName: 'z-s464913-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2024-04-01 18:04:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-04 15:25:54 +02:00
|
|
|
stage('Copy Artifacts from training job') {
|
2024-04-01 18:04:49 +02:00
|
|
|
steps {
|
2024-05-04 15:25:54 +02:00
|
|
|
copyArtifacts filter: 'model/*', projectName: 's464913-training/training', selector: buildParameter('BUILD_SELECTOR')
|
2024-04-01 18:04:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-04 15:25:54 +02:00
|
|
|
stage('Run predict script') {
|
|
|
|
steps {
|
|
|
|
sh 'chmod +x predict.py'
|
|
|
|
sh 'python3 ./predict.py'
|
2024-04-01 18:04:49 +02:00
|
|
|
}
|
2024-05-04 15:25:54 +02:00
|
|
|
}
|
2024-04-01 18:04:49 +02:00
|
|
|
|
2024-05-04 15:25:54 +02:00
|
|
|
stage('Run metrics script') {
|
2024-04-01 17:46:47 +02:00
|
|
|
steps {
|
2024-05-04 15:25:54 +02:00
|
|
|
sh 'chmod +x metrics.py'
|
|
|
|
sh 'python3 ./metrics.py'
|
2024-04-01 18:04:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Archive Artifacts') {
|
|
|
|
steps {
|
2024-05-04 15:25:54 +02:00
|
|
|
archiveArtifacts artifacts: 'evaluation/*', onlyIfSuccessful: true
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:24:07 +01:00
|
|
|
}
|
2024-03-24 11:31:18 +01:00
|
|
|
}
|
2024-03-20 14:21:31 +01:00
|
|
|
}
|