From 6d72c234ad840db9235d6cf7d34eef1769d69ddb Mon Sep 17 00:00:00 2001 From: Kornelia Girejko Date: Fri, 6 May 2022 19:36:02 +0200 Subject: [PATCH] Zaktualizuj 'Jenkinsfile_train' --- Jenkinsfile_train | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile_train b/Jenkinsfile_train index ff9cb02..7c0259f 100644 --- a/Jenkinsfile_train +++ b/Jenkinsfile_train @@ -1,24 +1,33 @@ pipeline { agent { - docker { image 'korneliag/ium478815:1.0' } + dockerfile { + additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} --build-arg CUTOFF=${params.CUTOFF} -t korneliag" + } } + parameters { + string( + defaultValue: 'kgirejko', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + + password( + defaultValue: '51854c15661583860a60db232a7026f0', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + } + stages { stage('First'){ steps { copyArtifacts filter: '*', projectName: 's478815-create-dataset' - sh 'python3 ./biblioteka_DL.py' + sh 'python3./biblioteka_DL.py' archiveArtifacts artifacts: 'model.pkl', followSymlinks: false } } } - post { - success { - emailext body: 'SUCCESS', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' - } - failure { - emailext body: 'FAILURE', subject: 's478815-training', to: 'e19191c5.uam.onmicrosoft.com@emea.teams.ms' - } - } - } \ No newline at end of file +} \ No newline at end of file