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