diff --git a/Jenkinsfile-docker b/Jenkinsfile-docker index 17900b6..dde6d66 100644 --- a/Jenkinsfile-docker +++ b/Jenkinsfile-docker @@ -18,19 +18,13 @@ pipeline { additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t s444409-create-dataset" } } - + stages { - stage('Run data stats') { + stage('Archive dataset and run training') { steps { - sh "python power_plant_data_stats.py" + archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true + build job: 's444409-training/main/' } } } - - post { - always { - archiveArtifacts artifacts: 'data/*', - onlyIfSuccessful: true - } - } } diff --git a/Jenkinsfile-train b/Jenkinsfile-train new file mode 100644 index 0000000..7b8aeed --- /dev/null +++ b/Jenkinsfile-train @@ -0,0 +1,22 @@ +pipeline { + agent { + docker { + image 's444409-create-dataset' + } + } + + stages { + stage('Train model') { + steps { + sh "python train_model.py" + } + } + } + + post { + always { + archiveArtifacts artifacts: 'model_out', + onlyIfSuccessful: true + } + } +}