From f4a434017f83ab4f81736bc1bb7c95f14a556bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pokrywka?= Date: Sun, 3 Apr 2022 13:17:49 +0200 Subject: [PATCH] refactoring --- Dockerfile | 4 +++- Jenkinsfile | 2 +- download_data_and_process.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7fd6374..f0a8dda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,6 @@ RUN pip3 install -r ./requirements.txt COPY ./process_data.sh ./ COPY ./download_data_and_process.py ./ COPY ./stats.py ./ -RUN ./process_data.sh \ No newline at end of file + +# Domyślne polecenie, które zostanie uruchomione w kontenerze po jego starcie +CMD python -u ./download_data_and_process.py \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 8853665..476f3bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { } agent { dockerfile { - additionalBuildArgs "--build-arg KAGGLE_USERNAME=${params.KAGGLE_USERNAME} --build-arg KAGGLE_KEY=${params.KAGGLE_KEY} -t ium" + additionalBuildArgs "-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY} -t ium" } } stages { diff --git a/download_data_and_process.py b/download_data_and_process.py index eb23b6a..932c995 100644 --- a/download_data_and_process.py +++ b/download_data_and_process.py @@ -1,6 +1,7 @@ import subprocess import pandas as pd import numpy as np +rc = subprocess.call("./process_data.sh") data=pd.read_csv('fake_job_postings.csv') data = data.replace(np.nan, '', regex=True)