pipeline { agent any triggers { upstream(upstreamProjects: 'z-s464937-create-dataset', threshold: hudson.model.Result.SUCCESS) } parameters { string(name: 'EPOCHS', defaultValue: '10', description: 'Epochs') buildSelector(defaultSelector: lastSuccessful(), description: 'Build no', name: 'BUILD_SELECTOR') } stages { stage('Clone Repository') { steps { git branch: 'training', url: "https://git.wmi.amu.edu.pl/s464937/ium_464937.git" } } stage('Copy Artifacts') { steps { copyArtifacts filter: 'openpowerlifting.csv', projectName: 'z-s464937-create-dataset', selector: buildParameter('BUILD_SELECTOR') } } stage("Run") { agent { dockerfile { filename 'Dockerfile' reuseNode true } } steps { sh "chmod +x ./model.py" sh "python3 ./model.py ${params.EPOCHS}" archiveArtifacts artifacts: 'powerlifting_model.h5', onlyIfSuccessful: true } } } }