diff --git a/Jenkinsfile b/Jenkinsfile index 33daf89..d1eda57 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,9 +24,8 @@ pipeline { stage('Run create-dataset script') { steps { withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh 'echo $KAGGLE_USERNAME' sh 'chmod +x create-dataset.py' - sh 'python3 ./create-dataset.py' + sh 'python3 ./create-dataset.py $KAGGLE_USERNAME $KAGGLE_KEY' } } } diff --git a/create-dataset.py b/create-dataset.py index 00ea4e0..227ed49 100644 --- a/create-dataset.py +++ b/create-dataset.py @@ -9,6 +9,7 @@ from sklearn.model_selection import train_test_split def download_kaggle_dataset(): + print(f'Kaggle API key: {os.environ["KAGGLE_KEY"]}') kaggle = KaggleApi() kaggle.authenticate() kaggle.dataset_download_files("mlg-ulb/creditcardfraud", path="./", unzip=True)