From 3ba963864befc813d0f060e93966d17331080738 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 5 May 2022 21:29:59 +0200 Subject: [PATCH] Use archived dataset and trigger training --- Jenkinsfile | 10 +++++----- Jenkinsfile-docker | 12 +++++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2d129ab..7ab7ef3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,11 +28,11 @@ pipeline { } } } - } - post { - always { - archiveArtifacts artifacts: 'data/*', - onlyIfSuccessful: true + stage('Archive dataset and run training') { + steps { + archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true + build job: 's444409-training/main/' + } } } } diff --git a/Jenkinsfile-docker b/Jenkinsfile-docker index 17900b6..4145331 100644 --- a/Jenkinsfile-docker +++ b/Jenkinsfile-docker @@ -20,16 +20,22 @@ pipeline { } stages { - stage('Run data stats') { + stage('Get arifacts') { steps { - sh "python power_plant_data_stats.py" + copyArtifacts fingerprintArtifacts: true, projectName: 's444409-create-dataset', selector: lastSuccessful() + } + } + + stage('Train model') { + steps { + sh "python train_model.py" } } } post { always { - archiveArtifacts artifacts: 'data/*', + archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true } }