ium_464914/Jenkinsfile

62 lines
2.3 KiB
Plaintext
Raw Normal View History

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-04-30 19:09:17 +02:00
gitParameter branchFilter: 'origin/(.*)', defaultValue: 'model', name: 'BRANCH', type: 'PT_BRANCH'
2024-04-29 21:09:13 +02:00
}
2024-05-04 16:48:31 +02:00
triggers {
upstream(upstreamProjects: 's464914-training/' + params.BRANCH + '/', threshold: hudson.model.Result.SUCCESS)
}
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:08:38 +02:00
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464914-create-dataset', selector: buildParameter('BUILD_SELECTOR')
2024-04-30 19:30:32 +02:00
copyArtifacts filter: '*', projectName: 's464914-training/' + params.BRANCH + '/', selector: buildParameter('BUILD_SELECTOR')
2024-04-30 16:11:33 +02:00
copyArtifacts filter: '*', projectName: 's464914-evaluation/evaluation/', selector: buildParameter('BUILD_SELECTOR'), optional: true
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-30 16:25:37 +02:00
stage('Plot Accuracy') {
steps {
script {
def customImage = docker.build("custom-image")
customImage.inside {
sh 'python3 ./plot.py'
archiveArtifacts artifacts: 'accuracy.png', onlyIfSuccessful: true
}
}
}
}
2024-04-29 21:22:42 +02:00
}
}