From 1388befc129ed9be360f5eee8309e397e05860f0 Mon Sep 17 00:00:00 2001 From: AWieczarek Date: Tue, 2 Apr 2024 23:13:26 +0200 Subject: [PATCH] IUM_04 --- Jenkinsfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a054176..51f4a4a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,19 +1,12 @@ pipeline { + agent { dockerfile true } + parameters { string(name: 'CUTOFF', defaultValue: '10000', description: 'Liczba wierszy do obcięcia ze zbioru danych') string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username') password(name: 'KAGGLE_KEY', defaultValue: '', description: 'Kaggle API key') } - agent { - dockerfile { - additionalBuildArgs '--build-arg="KAGGLE_KEY=test"' - reuseNode true - } - } - - - stages { stage('Clone Repository') { steps { @@ -27,6 +20,8 @@ pipeline { "KAGGLE_USERNAME=${env.KAGGLE_USERNAME}", "KAGGLE_KEY=${env.KAGGLE_KEY}" ]) { + sh 'mkdir -p ~/.kaggle' // Create .kaggle directory if needed + sh 'echo \'{"username": "${KAGGLE_USERNAME}", "key": "${KAGGLE_KEY}"}\' > ~/.kaggle/kaggle.json' sh "python3 IUM_02.py" } }