IUM_s464980/training/Jenkinsfile
Sheaza bc60e9bee2
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
add training pipeline
2024-05-14 21:26:05 +02:00

37 lines
1001 B
Groovy

pipeline {
agent any
parameters {
buildSelector (
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Checkout repository') {
steps {
checkout scm
}
}
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage("Training") {
agent {
dockerfile {
filename 'Dockerfile'
reuseNode true
}
}
steps {
sh "chmod +x ./train.py"
sh "python ./train.py"
archiveArtifacts artifacts: 'model.keras', onlyIfSuccessful: true
}
}
}
}