diff --git a/Dockerfile b/Dockerfile index 95564f1..3c579eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ FROM python:3.7 +ARG KAGGLE_USERNAME + +ARG KAGGLE_KEY + WORKDIR / RUN pip install --user kaggle @@ -12,12 +16,4 @@ COPY KaggleV2-May-2016.csv ./ COPY create_data.py ./ -COPY stats_data.py ./ - -CMD ["python", "./create_data.py"] - -CMD ["python", "./stats_data.py"] - -# RUN kaggle datasets download -d joniarroba/noshowappointments - -# RUN unzip -o noshowappointments.zip \ No newline at end of file +COPY stats_data.py ./ \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 55cf03b..7de59ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,8 @@ pipeline { stage("Dara Preparation") { agent { dockerfile { - additionalBuildArgs '-t ium' + additionalBuildArgs '-t ium' + args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}' } } steps { diff --git a/preparation.sh b/preparation.sh index 7bb3445..104ff1c 100644 --- a/preparation.sh +++ b/preparation.sh @@ -1,3 +1,4 @@ echo "Preparation inner" kaggle datasets download -d joniarroba/noshowappointments -!unzip -o noshowappointments.zip \ No newline at end of file +!unzip -o noshowappointments.zip +KaggleV2-May-2016.csv >> data.csv \ No newline at end of file