Zaktualizuj 'Jenkins_train'

This commit is contained in:
Witold Woch 2023-05-14 17:37:31 +02:00
parent 75ecfc8730
commit a80719d7a8

View File

@ -5,17 +5,17 @@ pipeline {
string(name: 'LR', defaultValue: '0.01', description: 'Learning rate')
}
stages {
stage('checkout: Check out from version control') {
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'){
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}"
dockerImage.inside {
sh "python train.py --epochs ${params.EPOCHS} --lr ${params.LR}"
archiveArtifacts artifacts: 'classificationn_model.pt', onlyIfSuccessful: true
}
}
@ -23,3 +23,4 @@ pipeline {
}
}
}