From ad164f3064f4195e1d4f3ba374242554b653ac85 Mon Sep 17 00:00:00 2001 From: s444501 Date: Sun, 1 May 2022 14:20:21 +0200 Subject: [PATCH] . --- Jenkinsfile | 9 +++++---- training.Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 training.Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile index 0c0ef6f..2ba9907 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,6 @@ pipeline { dockerfile {additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t zadanie"} } parameters { - string( defaultValue: 'shuhrer', description: 'Kaggle username', @@ -25,13 +24,11 @@ pipeline { stages { - stage('Check out from version control') { steps { checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444501', url: 'https://git.wmi.amu.edu.pl/s444501/ium_444501.git']]]) } } - stage('Shell Script') { steps { sh 'chmod u+x download.sh' @@ -42,7 +39,11 @@ pipeline { } archiveArtifacts artifacts: 'd_test.csv, d_dev.csv, d_train.csv' } - + } + stage ('Model - training') { + steps { + build job: 's444501-training/master', wait: false + } } } } diff --git a/training.Jenkinsfile b/training.Jenkinsfile new file mode 100644 index 0000000..661bc4d --- /dev/null +++ b/training.Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent { + docker {image 'zadanie'} + } + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + stages { + + stage('Copy artifacts') { + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 's444501-create-dataset', selector: buildParameter('BUILD_SELECTOR') + } + } + stage('Train model') { + steps { + sh 'python ium-data.py' + } + } + stage('Archive model') { + steps { + archiveArtifacts artifacts: 'model.pkl' + } + } + + } +} \ No newline at end of file