ium_464937/Jenkinsfile
Szymon Bartanowicz 6ecb5ee56a missing csv
2024-05-14 19:25:45 +02:00

38 lines
1.2 KiB
Groovy

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 powerlifting_test_predictions.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
}
}
}
}