38 lines
1.2 KiB
Groovy
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: 'data/dev.csv,data/test.csv,data/train.csv', projectName: 'z-s464937-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
|
}
|
|
}
|
|
stage("Run") {
|
|
agent {
|
|
dockerfile {
|
|
filename 'Dockerfile'
|
|
reuseNode true
|
|
}
|
|
}
|
|
steps {
|
|
sh "chmod +x ./app/model.py"
|
|
sh "python3 ./app/model.py ${params.EPOCHS}"
|
|
archiveArtifacts artifacts: 'powerlifting_model.h5', onlyIfSuccessful: true
|
|
}
|
|
}
|
|
}
|
|
} |