2024-03-26 17:53:46 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2024-03-26 19:21:06 +01:00
|
|
|
|
2024-05-14 19:21:17 +02:00
|
|
|
triggers {
|
|
|
|
upstream(upstreamProjects: 'z-s464937-create-dataset', threshold: hudson.model.Result.SUCCESS)
|
|
|
|
}
|
|
|
|
|
2024-03-26 19:21:06 +01:00
|
|
|
parameters {
|
2024-05-14 19:21:17 +02:00
|
|
|
string(name: 'EPOCHS', defaultValue: '10', description: 'Epochs')
|
|
|
|
buildSelector(defaultSelector: lastSuccessful(), description: 'Build no', name: 'BUILD_SELECTOR')
|
2024-03-26 19:21:06 +01:00
|
|
|
}
|
|
|
|
|
2024-03-26 17:53:46 +01:00
|
|
|
stages {
|
2024-05-14 19:21:17 +02:00
|
|
|
stage('Clone Repository') {
|
2024-03-26 19:21:06 +01:00
|
|
|
steps {
|
2024-05-14 19:21:17 +02:00
|
|
|
git branch: 'training', url: "https://git.wmi.amu.edu.pl/s464937/ium_464937.git"
|
2024-03-26 19:21:06 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-14 19:21:17 +02:00
|
|
|
stage('Copy Artifacts') {
|
2024-03-26 19:21:06 +01:00
|
|
|
steps {
|
2024-05-14 19:46:25 +02:00
|
|
|
copyArtifacts filter: 'dev.csv, test.csv, train.csv', projectName: 'z-s464937-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
2024-03-26 19:21:06 +01:00
|
|
|
}
|
|
|
|
}
|
2024-05-14 19:21:17 +02:00
|
|
|
stage("Run") {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'Dockerfile'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
2024-03-26 17:53:46 +01:00
|
|
|
steps {
|
2024-05-14 19:21:17 +02:00
|
|
|
sh "chmod +x ./model.py"
|
|
|
|
sh "python3 ./model.py ${params.EPOCHS}"
|
|
|
|
archiveArtifacts artifacts: 'powerlifting_model.h5', onlyIfSuccessful: true
|
2024-03-26 17:53:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-26 19:22:34 +01:00
|
|
|
}
|