diff --git a/Dockerfile b/Dockerfile index 5c2d9a8..95564f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,23 @@ FROM python:3.7 -ARG KAGGLE_USERNAME - -ARG KAGGLE_KEY - WORKDIR / RUN pip install --user kaggle + RUN pip install --user pandas + RUN pip install --user sklearn COPY KaggleV2-May-2016.csv ./ + COPY create_data.py ./ + COPY stats_data.py ./ -CMD python create_data.py -CMD python stats.py \ No newline at end of file +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 diff --git a/Jenkinsfile b/Jenkinsfile index 86b5ee4..6aebd13 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,10 +11,16 @@ pipeline { description: 'Kaggle username', name: 'KAGGLE_USERNAME' ) + string( + defaultValue: '10', + description: 'Value for head command', + name: 'CUTOFF' + ) } environment { KAGGLE_USERNAME="$params.KAGGLE_USERNAME" KAGGLE_KEY="$params.KAGGLE_KEY" + CUTOFF="$params.CUTOFF" } stages { stage('Checkout') { @@ -27,11 +33,26 @@ pipeline { } } } - stage ("Build Docker") { - steps { - sh 'docker build -t ium .' + stage("Build Docker") { + steps { + sh 'docker build -t ium_478855 .' + } + } + stage("Dara Preparation") { + steps { + sh 'echo "PREPARATION"' + sh "chmod u+x ./preparation.sh" + sh "./preparation.sh" + archiveArtifacts 'KaggleV2-May-2016.csv' + } + } + stage("Statistics") { + steps { + sh 'echo "STATISTICS"' + sh "chmod u+x ./statistics.sh" + sh "./statistics.sh" + archiveArtifacts 'statistics.csv' } } - } } } \ No newline at end of file