2023-05-13 01:10:40 +02:00
|
|
|
node {
|
|
|
|
checkout scm
|
|
|
|
|
2023-05-15 02:40:00 +02:00
|
|
|
stage('Init') {
|
|
|
|
properties([
|
|
|
|
pipelineTriggers([ upstream(threshold: hudson.model.Result.SUCCESS, upstreamProjects: 's452639-create-dataset' ) ]),
|
|
|
|
parameters([
|
|
|
|
buildSelector(
|
|
|
|
defaultSelector: lastSuccessful(),
|
|
|
|
description: "Source of dataset",
|
|
|
|
name: 'BUILD_SELECTOR'
|
|
|
|
),
|
|
|
|
string(
|
|
|
|
defaultValue: "2",
|
|
|
|
description: "Epochs count",
|
|
|
|
name: "EPOCHS",
|
|
|
|
trim: true
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
}
|
|
|
|
|
2023-05-13 01:10:40 +02:00
|
|
|
def local_image = docker.build("s452639-image")
|
|
|
|
|
2023-05-15 16:57:10 +02:00
|
|
|
local_image.inside('-v /tmp/mlruns:/tmp/mlruns -v /mlruns:/mlruns') {
|
2023-05-13 01:10:40 +02:00
|
|
|
stage('Build') {
|
2023-05-15 02:57:03 +02:00
|
|
|
checkout([$class: 'GitSCM', branches: [[name: BRANCH_NAME]], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452639/ium_452639']]])
|
2023-05-13 01:10:40 +02:00
|
|
|
|
|
|
|
copyArtifacts fingerprintArtifacts: true,
|
|
|
|
projectName: 's452639-create-dataset',
|
2023-05-13 01:17:18 +02:00
|
|
|
selector: lastSuccessful(),
|
2023-05-13 01:10:40 +02:00
|
|
|
flatten: true,
|
|
|
|
target: 'src/'
|
|
|
|
|
2023-05-15 02:40:00 +02:00
|
|
|
sh 'cd src; python tf_train.py $EPOCHS'
|
2023-05-15 16:39:09 +02:00
|
|
|
archiveArtifacts artifacts: 'src/model.keras,src/mlruns/**/*', followSymlinks: false
|
2023-05-13 01:10:40 +02:00
|
|
|
}
|
|
|
|
}
|
2023-05-15 02:40:00 +02:00
|
|
|
|
|
|
|
stage('Trigger') {
|
|
|
|
build wait: false, job: 's452639-evaluation.eg'
|
|
|
|
}
|
2023-05-13 01:10:40 +02:00
|
|
|
}
|
|
|
|
|