forked from s464914/ium_464914
58 lines
2.0 KiB
Groovy
58 lines
2.0 KiB
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
buildSelector (
|
|
defaultSelector: lastSuccessful(),
|
|
description: 'Build for copying artifacts',
|
|
name: 'BUILD_SELECTOR'
|
|
)
|
|
}
|
|
stages {
|
|
stage('Git Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Copy Artifacts') {
|
|
steps {
|
|
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464914-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: '*', projectName: 's464914-training/experiments/', selector: buildParameter('BUILD_SELECTOR')
|
|
copyArtifacts filter: '*', projectName: 's464914-evaluation/evaluation/', selector: buildParameter('BUILD_SELECTOR'), optional: true
|
|
}
|
|
}
|
|
stage('Prediction') {
|
|
steps {
|
|
script {
|
|
def customImage = docker.build("custom-image")
|
|
customImage.inside {
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
stage('Plot Accuracy') {
|
|
steps {
|
|
script {
|
|
def customImage = docker.build("custom-image")
|
|
customImage.inside {
|
|
sh 'python3 ./plot.py'
|
|
archiveArtifacts artifacts: 'accuracy.png', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |