28 lines
988 B
Plaintext
28 lines
988 B
Plaintext
pipeline {
|
|
agent any
|
|
parameters {
|
|
string(name: 'EPOCHS', defaultValue: '100', description: 'Number of epochs')
|
|
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
|
|
}
|
|
stages {
|
|
stage('Checkout: Check out from version control') {
|
|
steps {
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's487194', url: 'https://git.wmi.amu.edu.pl/s487194/ium_487194']]])
|
|
}
|
|
}
|
|
stage('Docker and Training') {
|
|
steps {
|
|
script {
|
|
def dockerImage = docker.image('s487194/ium:1')
|
|
dockerImage.inside {
|
|
sh "python train.py --epochs ${params.EPOCHS} --lr ${params.LR}"
|
|
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|