diff --git a/Jenkinsfile b/Jenkinsfile index 4a32f3a..33daf89 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,9 +24,7 @@ pipeline { stage('Run create-dataset script') { steps { withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh 'mkdir /root/.kaggle' - sh 'echo "{\"username\":\"$KAGGLE_USERNAME\",\"key\":\"$KAGGLE_KEY\"}" > /root/.kaggle/kaggle.json' - sh 'chmod 600 /root/.kaggle/kaggle.json' + sh 'echo $KAGGLE_USERNAME' sh 'chmod +x create-dataset.py' sh 'python3 ./create-dataset.py' } diff --git a/create-dataset.py b/create-dataset.py index 7ff160f..00ea4e0 100644 --- a/create-dataset.py +++ b/create-dataset.py @@ -9,7 +9,6 @@ from sklearn.model_selection import train_test_split def download_kaggle_dataset(): - os.system("/root/.kaggle/kaggle.json") kaggle = KaggleApi() kaggle.authenticate() kaggle.dataset_download_files("mlg-ulb/creditcardfraud", path="./", unzip=True)