IUM_s464980/evaluate/Jenkinsfile
Sheaza 793211467e
All checks were successful
s464980-evaluation/pipeline/head This commit looks good
s464980-training/pipeline/head This commit looks good
fix branch param 3
2024-05-14 22:57:15 +02:00

39 lines
1.4 KiB
Groovy

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