From 1fd50e7814af140ee9827461ca866d78e5b7246d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Zar=C4=99ba?= Date: Tue, 4 Apr 2023 19:23:40 +0200 Subject: [PATCH] feat: docker --- Jenkinsfile | 11 +++++++++-- Jenkinsfile2 | 9 +++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b2eb00b..5ef7f44 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,13 @@ pipeline { - agent any + agent { + dockerfile { + filename 'Dockerfile' + args '-u root:root' + } + } stages { - stage('Preparation') { + stage('Preparation') { when { expression { true } } steps { script { @@ -50,6 +55,8 @@ pipeline { unzip -o olympics-124-years-datasettill-2020.zip echo "Processed Data" > output.txt + + python3 /app/scripts/stats.py -i olympics-124-years-datasettill-2020/Athletes_summer_games.csv -o output.txt ''' sh "head -n ${params.CUTOFF} olympics-124-years-datasettill-2020/Athletes_summer_games.csv" } diff --git a/Jenkinsfile2 b/Jenkinsfile2 index f04d837..e961cbf 100644 --- a/Jenkinsfile2 +++ b/Jenkinsfile2 @@ -1,5 +1,10 @@ pipeline { - agent any + agent { + docker { + image 's487187/ium:general' + args '-u root:root' + } + } parameters { buildSelector( @@ -42,7 +47,7 @@ pipeline { sh ''' #!/bin/bash - wc -l olympics-124-years-datasettill-2020/Athletes_summer_games.csv > output.txt + python3 count_lines.py --input_file olympics-124-years-datasettill-2020/Athletes_summer_games.csv > output.txt ''' } }