From 0710ae8d0b6398950013ffa1978a4573982bd20e Mon Sep 17 00:00:00 2001 From: ulaniuk Date: Sun, 3 Apr 2022 22:07:58 +0200 Subject: [PATCH] 1 --- Dockerfile | 5 ++++- Jenkinsfile | 25 ++++--------------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 68aeb2a..5c2d9a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,7 @@ RUN pip install --user sklearn COPY KaggleV2-May-2016.csv ./ COPY create_data.py ./ -COPY stats_data.py ./ \ No newline at end of file +COPY stats_data.py ./ + +CMD python create_data.py +CMD python stats.py \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 2021c46..86b5ee4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,16 +11,10 @@ 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') { @@ -33,22 +27,11 @@ pipeline { } } } - stage("Data Preparation") { - agent { - dockerfile { - additionalBuildArgs '-t ium' - args '-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}' - } - } - steps { - sh "python create_data.py" - archiveArtifacts 'KaggleV2-May-2016.csv' - } - } - stage("Statistics") { - steps { - sh "python stats.py" + stage ("Build Docker") { + steps { + sh 'docker build -t ium .' } } + } } } \ No newline at end of file