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 ./
|
COPY heart_2020_cleaned.csv ./
|
||||||
|
|
||||||
|
|
||||||
CMD ["python3", "./ml_training.py", EPOCHS]
|
CMD ["python3", "./ml_training.py"]
|
||||||
|
@ -2,14 +2,22 @@ pipeline {
|
|||||||
agent {
|
agent {
|
||||||
dockerfile true
|
dockerfile true
|
||||||
}
|
}
|
||||||
parameters {
|
|
||||||
string(
|
|
||||||
defaultValue: "10",
|
|
||||||
description: 'How many epochs during training?',
|
|
||||||
name: 'epochs'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
stages {
|
stages {
|
||||||
|
stage("Setup parameters") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
properties([
|
||||||
|
parameters([
|
||||||
|
string(
|
||||||
|
defaultValue: '10',
|
||||||
|
name: 'EPOCHS',
|
||||||
|
trim: true
|
||||||
|
)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage("Git clone") {
|
stage("Git clone") {
|
||||||
steps {
|
steps {
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]])
|
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") {
|
stage("Training") {
|
||||||
steps {
|
steps {
|
||||||
withEnv(["EPOCHS=${params.EPOCHS}"]) {
|
|
||||||
sh "chmod 777 ml_training.py"
|
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