ium_464914/Jenkinsfile
2024-04-29 21:45:09 +02:00

34 lines
1.1 KiB
Groovy

pipeline {
agent any
parameters {
buildSelector (
defaultSelector: lastSuccessful(),
description: 'Build for copying artifacts',
name: 'BUILD_SELECTOR'
)
string(name: 'EPOCHS', defaultValue: '10', description: 'epochs')
}
stages {
stage('Git Checkout') {
steps {
checkout scm
}
}
stage('Copy Artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464914-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage('Train') {
steps {
script {
def customImage = docker.build("custom-image")
customImage.inside {
sh 'python3 ./model.py ' + params.EPOCHS
archiveArtifacts artifacts: 'model.pth, predictions.txt', onlyIfSuccessful: true
}
}
}
}
}
}