add training pipeline
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
Some checks failed
s464980-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
232087b4b0
commit
bc60e9bee2
@ -11,6 +11,6 @@ WORKDIR ./app
|
||||
|
||||
COPY ./get_dataset.py ./
|
||||
COPY ./get_stats.py ./
|
||||
COPY ./train.py ./
|
||||
COPY training/train.py ./
|
||||
COPY predict.py ./
|
||||
CMD bash
|
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@ -49,21 +49,4 @@ pipeline {
|
||||
archiveArtifacts artifacts: 'dataset.csv,df_train.csv,df_test.csv', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
stage("Prediction") {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
sh "chmod +x ./train.py"
|
||||
sh "chmod +x ./predict.py"
|
||||
sh "python ./train.py"
|
||||
sh "python ./predict.py"
|
||||
archiveArtifacts artifacts: 'model.keras,predictions.txt', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
36
training/Jenkinsfile
vendored
Normal file
36
training/Jenkinsfile
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
pipeline {
|
||||
agent any
|
||||
parameters {
|
||||
buildSelector (
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'BUILD_SELECTOR'
|
||||
)
|
||||
}
|
||||
stages {
|
||||
stage('Checkout repository') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('Copy artifacts') {
|
||||
steps {
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 'z-s464980-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
stage("Training") {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
reuseNode true
|
||||
}
|
||||
}
|
||||
|
||||
steps {
|
||||
sh "chmod +x ./train.py"
|
||||
sh "python ./train.py"
|
||||
archiveArtifacts artifacts: 'model.keras', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user