pipeline { agent { dockerfile true } parameters { string( name: 'EPOCHS', defaultValue: '10', description: 'Number of epochs in training' ) } stages { stage("Git clone") { steps { checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]]) } } stage("Training") { steps { sh "chmod 777 ml_training.py" sh "python3 ml_training.py $EPOCHS" archiveArtifacts artifacts: "trained_model/*", onlyIfSuccessful: true } } } post { success { emailext body: "SUCCESS", subject: "s444465-training build status", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms" } failure { emailext body: "FAILURE", subject: "s444465-training build status", to: "e19191c5.uam.onmicrosoft.com@emea.teams.ms" } } }