ium_464937/Jenkinsfile

38 lines
1.2 KiB
Plaintext
Raw Normal View History

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:58:32 +02:00
copyArtifacts filter: 'data/dev.csv,data/test.csv,data/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 21:41:21 +02:00
sh "chmod +x model.py"
sh "python3 model.py ${params.EPOCHS}"
2024-05-14 19:21:17 +02:00
archiveArtifacts artifacts: 'powerlifting_model.h5', onlyIfSuccessful: true
2024-03-26 17:53:46 +01:00
}
}
}
2024-03-26 19:22:34 +01:00
}