Multibranch pipeline fix
This commit is contained in:
parent
55a736d0ce
commit
9e90bd0876
@ -16,4 +16,4 @@ COPY ml_training.py ./
|
||||
COPY heart_2020_cleaned.csv ./
|
||||
|
||||
|
||||
CMD ["python3", "./ml_training.py", EPOCHS]
|
||||
CMD ["python3", "./ml_training.py"]
|
||||
|
@ -2,14 +2,22 @@ pipeline {
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
parameters {
|
||||
string(
|
||||
defaultValue: "10",
|
||||
description: 'How many epochs during training?',
|
||||
name: 'epochs'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage("Setup parameters") {
|
||||
steps {
|
||||
script {
|
||||
properties([
|
||||
parameters([
|
||||
string(
|
||||
defaultValue: '10',
|
||||
name: 'EPOCHS',
|
||||
trim: true
|
||||
)
|
||||
])
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
stage("Git clone") {
|
||||
steps {
|
||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]])
|
||||
@ -17,10 +25,8 @@ pipeline {
|
||||
}
|
||||
stage("Training") {
|
||||
steps {
|
||||
withEnv(["EPOCHS=${params.EPOCHS}"]) {
|
||||
sh "chmod 777 ml_training.py"
|
||||
sh "python3 ml_training.py $EPOCHS"
|
||||
}
|
||||
sh "python3 ml_training.py"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user