From 28581651daecc01f4afbdec3d0203474758b0eba Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 18:00:26 +0200 Subject: [PATCH 01/55] Dockerfile --- Dockerfile | 18 +++++++++++ Jenkinsfile | 86 +++++++++++++++++++++++++---------------------------- README.md | 4 +-- skrypt.sh | 4 +-- 4 files changed, 62 insertions(+), 50 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a693aef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest +FROM ubuntu:latest + +# Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes) +RUN apt update +RUN apt install -y python3 python3-pip dos2unix +RUN pip3 install kaggle +RUN apt install -y unzip + +# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane) +WORKDIR /app + +# Skopiujmy nasz skrypt do katalogu /app w kontenerze +COPY ./skrypt.sh ./ +RUN chmod +x skrypt.sh +RUN dos2unix skrypt.sh + +CMD ./skrypt.sh 0 diff --git a/Jenkinsfile b/Jenkinsfile index 2bab0aa..6ba4e6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,46 +1,40 @@ -pipeline { - agent any - parameters { - string( - defaultValue: '0', - description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', - name: 'CUTOFF', - trim: false - ) - string( - defaultValue: 'rokoch', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false - ) - password( - defaultValue: '', - description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', - name: 'KAGGLE_KEY' - ) - } - stages { - stage('checkout') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - } - } - - stage('sh') { - steps { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh "chmod +x skrypt.sh" - sh "./skrypt.sh ${params.CUTOFF} | tee output.txt" - } - } - } - - stage('end') { - steps { - //Zarchiwizuj wynik - archiveArtifacts 'output.txt,Global_Superstore22.csv,Global_Superstore2.csv.dev,Global_Superstore2.csv.test,Global_Superstore2.csv.train' - } - } - } -} \ No newline at end of file +pipeline { + agent any + parameters { + string( + defaultValue: '0', + description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', + name: 'CUTOFF', + trim: false + ) + string( + defaultValue: 'rokoch', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password( + defaultValue: '', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + } + stages { + stage('checkout') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + } + } + + stage('docker') { + agent { dockerfile true } + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh "chmod +x skrypt.sh" + sh "./skrypt.sh ${params.CUTOFF} | tee output.txt" + } + } + } + } +} diff --git a/README.md b/README.md index 85fc543..5c8b3a9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# ium_426206 - +# ium_426206 + Inżynieria Uczenia Maszynowego \ No newline at end of file diff --git a/skrypt.sh b/skrypt.sh index 7b0b3c0..25e4973 100644 --- a/skrypt.sh +++ b/skrypt.sh @@ -1,7 +1,7 @@ #!/bin/bash kaggle datasets download -d apoorvaappz/global-super-store-dataset unzip -o global-super-store-dataset.zip -if [ $1 = "0" ]; then +if [[ $1 = "0" ]]; then CUTOFF=51291 cp Global_Superstore2.csv Global_Superstore22.csv else @@ -16,4 +16,4 @@ head -n $((prop1*2)) Global_Superstore2.csv.shuf | tail -n $prop1 > Global_Super tail -n +$((prop1*2+1)) Global_Superstore2.csv.shuf > Global_Superstore2.csv.train rm Global_Superstore2.csv.shuf #Sprawdźmy, czy wielkości się zgadzają: -wc -l Global_Superstore2* \ No newline at end of file +wc -l Global_Superstore2* From 604a36888f534aadc0fbf25ac2e6957888c87aae Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 18:16:12 +0200 Subject: [PATCH 02/55] zmienne --- Jenkinsfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6ba4e6b..c18ef14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,12 +27,11 @@ pipeline { } stage('docker') { - agent { dockerfile true } steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh "chmod +x skrypt.sh" - sh "./skrypt.sh ${params.CUTOFF} | tee output.txt" + img = docker.build 'rokoch/ium:01' + img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') } } } From f8928d617684efcecab878bfb7f6668e68911983 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 18:22:49 +0200 Subject: [PATCH 03/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c18ef14..48d0191 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - img = docker.build 'rokoch/ium:01' + img = docker.image('rokoch/ium:01') img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') } } From 85536d779a7f3612762883ada638792c227f0b65 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 18:26:07 +0200 Subject: [PATCH 04/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 48d0191..3629ba2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - img = docker.image('rokoch/ium:01') + def img = docker.build('rokoch/ium:01') img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') } } From f89ad3dbc82f7ce7e10db706d238366d08298b2f Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:03:15 +0200 Subject: [PATCH 05/55] zmienne --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3629ba2..40289fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,8 +30,10 @@ pipeline { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - def img = docker.build('rokoch/ium:01') - img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') + script { + def img = docker.build('rokoch/ium:01') + img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') + } } } } From 07911fe6b51a18e4093eb7d65edb622018afa918 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:08:19 +0200 Subject: [PATCH 06/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 40289fc..4035a06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,7 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.run('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') + img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} } } } From 545a7c10ef6a4c0543fbd96d68c4f3a01ca16389 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:09:53 +0200 Subject: [PATCH 07/55] zmienne --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a693aef..6d095dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -CMD ./skrypt.sh 0 +#CMD ./skrypt.sh 0 From 1fcda645424a069f32be06361941f487bbbb0911 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:10:44 +0200 Subject: [PATCH 08/55] zmienne --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4035a06..31a2ac6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,9 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} + img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + sh './skrypt.sh 0' + } } } } From 51220a5bcf89c90017878eccd0189426f99f20d1 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:16:00 +0200 Subject: [PATCH 09/55] zmienne --- Dockerfile | 2 +- Jenkinsfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d095dd..a693aef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -#CMD ./skrypt.sh 0 +CMD ./skrypt.sh 0 diff --git a/Jenkinsfile b/Jenkinsfile index 31a2ac6..9059ab2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' } } From 9574d96c92d8168f6a24ebc509088df4f0a534b5 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:17:57 +0200 Subject: [PATCH 10/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9059ab2..ce4a225 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,7 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + img.inside() { sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' } From 970ffd1a858e685b61d6d0662bacf96987b299a8 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:21:18 +0200 Subject: [PATCH 11/55] zmienne --- Jenkinsfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ce4a225..d7b495a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,9 +32,10 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.inside() { - sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' + img.inside { + sh 'ls -l' + sh 'chmod +x skrypt.sh' + sh './skrypt.sh 0' } } } From f0ecf4a0fa091d4f5106d8e4b57fadcc7dd92be9 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:23:33 +0200 Subject: [PATCH 12/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index d7b495a..f274fc9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,7 @@ pipeline { } stage('docker') { + agent { dockerfile true } steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { From 4e5d1e12e1cfd6ca48c39203a47217938909c0d9 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:34:59 +0200 Subject: [PATCH 13/55] zmienne --- Jenkinsfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f274fc9..d868804 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,13 +31,10 @@ pipeline { steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - script { - def img = docker.build('rokoch/ium:01') - img.inside { sh 'ls -l' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' - } + } } } From 1b13d2802b04e66167e39a83e23ce29ab29f999e Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:36:27 +0200 Subject: [PATCH 14/55] zmienne --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d868804..92ccae5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,8 +34,6 @@ pipeline { sh 'ls -l' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' - - } } } } From 86d203e25529aae024662a5f9469c09c789cf221 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 19:53:39 +0200 Subject: [PATCH 15/55] zmienne --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 92ccae5..f20bf17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent any + agent { dockerfile true } parameters { string( defaultValue: '0', @@ -27,7 +27,6 @@ pipeline { } stage('docker') { - agent { dockerfile true } steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { From 6fa027137c0aa25bd39529f5a4e828e2f4e9f21f Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:12:30 +0200 Subject: [PATCH 16/55] zmienne --- Jenkinsfile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f20bf17..c0a0bd9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,4 @@ pipeline { - agent { dockerfile true } parameters { string( defaultValue: '0', @@ -27,13 +26,11 @@ pipeline { } stage('docker') { + agent { dockerfile true } steps { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh 'ls -l' - sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' - } + sh 'ls -l' + sh 'chmod +x skrypt.sh' + sh './skrypt.sh 0' } } } From 277e646783508ef5992beec7d5b8ded853bf0332 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:13:29 +0200 Subject: [PATCH 17/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index c0a0bd9..0041130 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,5 @@ pipeline { + agent any parameters { string( defaultValue: '0', From 4cd08afff3001f02781dc6beb28039004dfc4d5c Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:20:09 +0200 Subject: [PATCH 18/55] zmienne --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a693aef..cc05879 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -CMD ./skrypt.sh 0 +# CMD ./skrypt.sh 0 From c84defa3dab774b5be51961082e6be2434ab4bb2 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:28:15 +0200 Subject: [PATCH 19/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0041130..e46a776 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,7 @@ pipeline { stage('docker') { agent { dockerfile true } steps { + sh 'cat /etc/issue' sh 'ls -l' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' From a8dd740c2ffef0d2aaca23314db14fffecdc8444 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:29:20 +0200 Subject: [PATCH 20/55] zmienne --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e46a776..0d5cad1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,5 @@ pipeline { - agent any + agent { dockerfile true } parameters { string( defaultValue: '0', @@ -27,7 +27,6 @@ pipeline { } stage('docker') { - agent { dockerfile true } steps { sh 'cat /etc/issue' sh 'ls -l' From 182cb2507722b390f657631303cc47d035837d0d Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:32:06 +0200 Subject: [PATCH 21/55] zmienne --- Jenkinsfile | 77 ++++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d5cad1..ed8d2c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,38 +1,41 @@ -pipeline { - agent { dockerfile true } - parameters { - string( - defaultValue: '0', - description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', - name: 'CUTOFF', - trim: false - ) - string( - defaultValue: 'rokoch', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false - ) - password( - defaultValue: '', - description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', - name: 'KAGGLE_KEY' - ) - } - stages { - stage('checkout') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - } - } - - stage('docker') { - steps { - sh 'cat /etc/issue' - sh 'ls -l' - sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' - } - } +node { + stage('One') { + + properties([ + parameters([ + string(defaultValue: '', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false), + password(defaultValue: '', + description: 'Kaggle token', + name: 'KAGGLE_KEY') + ]) + ] + ) + stage('Two') { + + + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + + + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + + checkout scm + + def image = docker.build("image") + image.inside { + sh 'ls -l' + + + } + + + + + + } + } } -} +} \ No newline at end of file From be05b441b32d8ec8fd360ce7265584b747927c6a Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:34:08 +0200 Subject: [PATCH 22/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ed8d2c1..d2d10a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ node { def image = docker.build("image") image.inside { sh 'ls -l' - + sh 'cat /etc/issue' } From b1b468bf93b0b5e85db44a18f73b61effa9411d0 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:40:17 +0200 Subject: [PATCH 23/55] zmienne --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2d10a2..380b013 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,8 +26,10 @@ node { def image = docker.build("image") image.inside { - sh 'ls -l' - sh 'cat /etc/issue' + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh './skrypt.sh' + } } From 25fda138b9e31b5561b1a86ffdd9525fb625a05b Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:44:27 +0200 Subject: [PATCH 24/55] zmienne --- Jenkinsfile | 81 ++++++++++++++++++++++++++--------------------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 380b013..c80a7a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,43 +1,42 @@ -node { - stage('One') { - - properties([ - parameters([ - string(defaultValue: '', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false), - password(defaultValue: '', - description: 'Kaggle token', - name: 'KAGGLE_KEY') - ]) - ] - ) - stage('Two') { - - - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - - - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - - checkout scm - - def image = docker.build("image") - image.inside { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh './skrypt.sh' - } - +pipeline { + agent any + parameters { + string( + defaultValue: '0', + description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', + name: 'CUTOFF', + trim: false + ) + string( + defaultValue: 'rokoch', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password( + defaultValue: '', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + } + stages { + stage('checkout') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + } + } + + stage('docker') { + agent { dockerfile true } + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + sh 'ls -l' + sh 'chmod +x skrypt.sh' + sh './skrypt.sh 0' } - - - - - - } - } + } + } + } } -} \ No newline at end of file +} From 1b2846117beceb362e00340473e59095515feb7d Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:48:27 +0200 Subject: [PATCH 25/55] zmienne --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cc05879..a693aef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -# CMD ./skrypt.sh 0 +CMD ./skrypt.sh 0 From 4260c20ebd7ae42f304a8d9323a3f6b2bbfa022a Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:50:34 +0200 Subject: [PATCH 26/55] zmienne --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c80a7a2..92ccae5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,6 @@ pipeline { sh 'ls -l' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' - } } } } From 992d34843ae6de14249d2ea820e2e8e7b8ae51dd Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:53:06 +0200 Subject: [PATCH 27/55] zmienne --- Jenkinsfile | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 92ccae5..7c1b7d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,41 +1,41 @@ pipeline { - agent any + agent any parameters { - string( + string( defaultValue: '0', description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', name: 'CUTOFF', trim: false - ) - string( - defaultValue: 'rokoch', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false - ) - password( - defaultValue: '', - description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', - name: 'KAGGLE_KEY' - ) + ) + string( + defaultValue: 'rokoch', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password( + defaultValue: '', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) } - stages { - stage('checkout') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - } - } + stages { + stage('checkout') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + } + } - stage('docker') { - agent { dockerfile true } - steps { + stage('docker') { + steps { withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh 'ls -l' - sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + script { + def img = docker.build('rokoch/ium:01') + img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} + } } - } - } - } + } + } + } } From 108eedb9b48eceba45407dbb5ff81a294dd2ce26 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 20:56:17 +0200 Subject: [PATCH 28/55] zmienne --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a693aef..398dc98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,5 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -CMD ./skrypt.sh 0 +CMD ls -l +#CMD ./skrypt.sh 0 From cdca12aad5a9f4bcbbec19c3dd34a98970ec3cf9 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:05:16 +0200 Subject: [PATCH 29/55] zmienne --- Dockerfile | 2 +- Jenkinsfile | 51 +++++++++++---------------------------------------- 2 files changed, 12 insertions(+), 41 deletions(-) diff --git a/Dockerfile b/Dockerfile index 398dc98..ba1f321 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest -FROM ubuntu:latest +FROM ubuntu:focal # Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes) RUN apt update diff --git a/Jenkinsfile b/Jenkinsfile index 7c1b7d8..4166453 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,41 +1,12 @@ pipeline { - agent any - parameters { - string( - defaultValue: '0', - description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', - name: 'CUTOFF', - trim: false - ) - string( - defaultValue: 'rokoch', - description: 'Kaggle username', - name: 'KAGGLE_USERNAME', - trim: false - ) - password( - defaultValue: '', - description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', - name: 'KAGGLE_KEY' - ) - } - stages { - stage('checkout') { - steps { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) - } - } - - stage('docker') { - steps { - withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", - "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - script { - def img = docker.build('rokoch/ium:01') - img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} - } - } - } - } - } -} + agent { + docker { image 'node:14-alpine' } + } + stages { + stage('Test') { + steps { + sh 'node --version' + } + } + } +} \ No newline at end of file From 51ffbaeaa7fb5773af24cd1676a488f064018be7 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:08:27 +0200 Subject: [PATCH 30/55] zmienne --- Jenkinsfile | 51 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4166453..7c1b7d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,41 @@ pipeline { - agent { - docker { image 'node:14-alpine' } - } - stages { - stage('Test') { - steps { - sh 'node --version' - } - } - } -} \ No newline at end of file + agent any + parameters { + string( + defaultValue: '0', + description: 'Umożliwia zdefiniowanie wielkości odcięcia zbioru danych.', + name: 'CUTOFF', + trim: false + ) + string( + defaultValue: 'rokoch', + description: 'Kaggle username', + name: 'KAGGLE_USERNAME', + trim: false + ) + password( + defaultValue: '', + description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials', + name: 'KAGGLE_KEY' + ) + } + stages { + stage('checkout') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s426206/ium_426206.git']]]) + } + } + + stage('docker') { + steps { + withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", + "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { + script { + def img = docker.build('rokoch/ium:01') + img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} + } + } + } + } + } +} From addfa48d1b49638d5da65cac0926350c11969020 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:11:13 +0200 Subject: [PATCH 31/55] zmienne --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c1b7d8..5f5ebff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,9 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') {} + img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + sh 'cat /etc/issue' + } } } } From 54467be16821a7b14dcdb753c9945cb13971758e Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:12:13 +0200 Subject: [PATCH 32/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5f5ebff..ede85bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { - sh 'cat /etc/issue' + sh './skrypt.sh 0' } } } From 74420741107e28fc7d66adf207ed3fe704213b6a Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:13:26 +0200 Subject: [PATCH 33/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index ede85bd..4c16cd8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' } } From 1c5eb4f0b64ee1620451acc7da76627737d482ad Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:14:45 +0200 Subject: [PATCH 34/55] zmienne --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 4c16cd8..e88724c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,9 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + sh 'export KAGGLE_USERNAME' + sh 'export KAGGLE_KEY' + sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' } From a6568893ee80436383b541130712562f504367d3 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:21:23 +0200 Subject: [PATCH 35/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index e88724c..16bb0e3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,6 +35,7 @@ pipeline { img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { sh 'export KAGGLE_USERNAME' sh 'export KAGGLE_KEY' + sh 'ls -l' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' From 02253dc1b16ed91b5003ce86e3ae138a6ed09878 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:22:47 +0200 Subject: [PATCH 36/55] zmienne --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 16bb0e3..4fbbdba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,9 +33,8 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { - sh 'export KAGGLE_USERNAME' - sh 'export KAGGLE_KEY' sh 'ls -l' + sh 'printenv' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' From 865160ce6348afc2ecdce4ea350e6eb490bde0a7 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:27:21 +0200 Subject: [PATCH 37/55] zmienne --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4fbbdba..ed0cb46 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,8 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { script { def img = docker.build('rokoch/ium:01') - img.inside('-e KAGGLE_USERNAME=${params.KAGGLE_USERNAME} -e KAGGLE_KEY=${params.KAGGLE_KEY}') { + img.inside { + sh 'rm *.csv' sh 'ls -l' sh 'printenv' sh 'cat /etc/issue' From 2fbc1c8233b73b0cc692a0316d9207e271b51ed4 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:28:47 +0200 Subject: [PATCH 38/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ed0cb46..a5cf5f8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { - sh 'rm *.csv' + sh 'rm *.csv *.zip' sh 'ls -l' sh 'printenv' sh 'cat /etc/issue' From 1c6f08ccf19cb1e072fd5d8ded5ce3c196c8d400 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:31:00 +0200 Subject: [PATCH 39/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a5cf5f8..6885612 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,8 +34,8 @@ pipeline { def img = docker.build('rokoch/ium:01') img.inside { sh 'rm *.csv *.zip' + sh 'mkdir .kaggle' sh 'ls -l' - sh 'printenv' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' sh './skrypt.sh 0' From 655f33c5bcb63fc59ea7e4a037e8f11b92eb6d0f Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:31:57 +0200 Subject: [PATCH 40/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6885612..0d28a8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { - sh 'rm *.csv *.zip' + sh 'rm -f *.csv *.zip' sh 'mkdir .kaggle' sh 'ls -l' sh 'cat /etc/issue' From 4186c5ca121c9039086acfc0091d5f379e8d524f Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:33:18 +0200 Subject: [PATCH 41/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d28a8a..8f0f06b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { def img = docker.build('rokoch/ium:01') img.inside { sh 'rm -f *.csv *.zip' - sh 'mkdir .kaggle' + sh 'mkdir /.kaggle' sh 'ls -l' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' From c40092917596e4c813631dafb35a78ac2c46c9ab Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:43:27 +0200 Subject: [PATCH 42/55] zmienne --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8f0f06b..a68f9b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,6 +33,7 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { + sh 'kaggle config path -p .' sh 'rm -f *.csv *.zip' sh 'mkdir /.kaggle' sh 'ls -l' From 565eb748c2dacdc65ced8fd7981493e63382d5e1 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:44:04 +0200 Subject: [PATCH 43/55] zmienne --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a68f9b6..6dbeb06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,7 +35,6 @@ pipeline { img.inside { sh 'kaggle config path -p .' sh 'rm -f *.csv *.zip' - sh 'mkdir /.kaggle' sh 'ls -l' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' From 3e2c1993380e40e4ed82f3706d87c6215e6f812c Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:47:06 +0200 Subject: [PATCH 44/55] zmienne --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6dbeb06..bc0f3c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,7 +38,7 @@ pipeline { sh 'ls -l' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' + sh 'sudo ./skrypt.sh 0' } } } From 148fa4394a0a9c2d9540804b70dbb7f0e088ca57 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:47:48 +0200 Subject: [PATCH 45/55] zmienne --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index bc0f3c6..b39312b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,7 +33,6 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { - sh 'kaggle config path -p .' sh 'rm -f *.csv *.zip' sh 'ls -l' sh 'cat /etc/issue' From c411a6278c44082c8c7925c12e0d9440e68480db Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:49:02 +0200 Subject: [PATCH 46/55] zmienne --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b39312b..f74d953 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,11 +33,13 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { + sh 'who' + sh 'chmod -R 777 /' sh 'rm -f *.csv *.zip' sh 'ls -l' sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' - sh 'sudo ./skrypt.sh 0' + sh './skrypt.sh 0' } } } From fa934aea2a8cae1a27c34e690986c60c0e6ba647 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:50:52 +0200 Subject: [PATCH 47/55] zmienne --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f74d953..00b55f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,8 +33,6 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { - sh 'who' - sh 'chmod -R 777 /' sh 'rm -f *.csv *.zip' sh 'ls -l' sh 'cat /etc/issue' From 16ab0ca49c0047fac61cad2e46c4fcc6b1a5cf24 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 21:53:08 +0200 Subject: [PATCH 48/55] zmienne --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index ba1f321..2a5d704 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ RUN apt update RUN apt install -y python3 python3-pip dos2unix RUN pip3 install kaggle RUN apt install -y unzip +RUN mkdir /.kaggle +RUN chmod -R 777 /.kaggle # Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane) WORKDIR /app From 4da0cf094f89879323f9f5f0f0527a55d3a333fa Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 22:37:04 +0200 Subject: [PATCH 49/55] dzialajacy kaggla --- Dockerfile | 2 -- Jenkinsfile | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a5d704..9e7b804 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,5 +17,3 @@ COPY ./skrypt.sh ./ RUN chmod +x skrypt.sh RUN dos2unix skrypt.sh -CMD ls -l -#CMD ./skrypt.sh 0 diff --git a/Jenkinsfile b/Jenkinsfile index 00b55f1..f994927 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,11 +33,8 @@ pipeline { script { def img = docker.build('rokoch/ium:01') img.inside { - sh 'rm -f *.csv *.zip' - sh 'ls -l' - sh 'cat /etc/issue' sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' + sh './skrypt.sh ${params.CUTOFF}' } } } From d9dd1ca3e20a830d30c5b64ca38b8d0d35168676 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 22:38:43 +0200 Subject: [PATCH 50/55] dzialajacy kaggl --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f994927..b91d39f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { def img = docker.build('rokoch/ium:01') img.inside { sh 'chmod +x skrypt.sh' - sh './skrypt.sh ${params.CUTOFF}' + sh './skrypt.sh 0' } } } From 1775098f93ea7bdff6f3b971fbcb9111bd1375e3 Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 23:03:36 +0200 Subject: [PATCH 51/55] save archive --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index b91d39f..07389d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -40,5 +40,12 @@ pipeline { } } } + + stage('end') { + steps { + //Zarchiwizuj wynik + archiveArtifacts 'output.txt,Global_Superstore22.csv,Global_Superstore2.csv.dev,Global_Superstore2.csv.test,Global_Superstore2.csv.train' + } + } } } From ea15c81737aa3619cddc0f0526b68f37903e435f Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 23:05:37 +0200 Subject: [PATCH 52/55] install git on docker --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9e7b804..97fd44e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM ubuntu:focal # Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes) RUN apt update -RUN apt install -y python3 python3-pip dos2unix +RUN apt install -y python3 python3-pip dos2unix git RUN pip3 install kaggle RUN apt install -y unzip RUN mkdir /.kaggle From 9d752838d92129480c37e8df0cf9bcf79c282eaa Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 23:21:00 +0200 Subject: [PATCH 53/55] jenkinsfile_stats added. --- Jenkinsfile_stats | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Jenkinsfile_stats diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats new file mode 100644 index 0000000..11dc138 --- /dev/null +++ b/Jenkinsfile_stats @@ -0,0 +1,30 @@ +pipeline { + //agent { docker {image 'rokoch/ium:01' }} + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + } + stages { + stage('Copy artifact') { + steps { + copyArtifacts filter: 'Global_Superstore22.csv,Global_Superstore2.csv.dev,Global_Superstore2.csv.test,Global_Superstore2.csv.train', fingerprintArtifacts: false, projectName: 's426206-create-dataset', selector: buildParameter('BUILD_SELECTOR') + } + } + stage('Clone repo') { + steps { + script { + docker.image("rokoch/ium:01").inside { + sh 'rm -rf ium_426206' + sh 'git clone https://git.wmi.amu.edu.pl/s426206/ium_426206.git' + sh "chmod +x ium_426206/stats.sh" + sh "ium_426206/stats.sh | tee output.txt" + archiveArtifacts 'output.txt' + } + } + } + } + } +} From 766d597dea6425767b79f4a33ed4fb33995a16db Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 23:29:15 +0200 Subject: [PATCH 54/55] download from docker hub? --- Jenkinsfile_stats | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats index 11dc138..c2fb268 100644 --- a/Jenkinsfile_stats +++ b/Jenkinsfile_stats @@ -16,13 +16,15 @@ pipeline { stage('Clone repo') { steps { script { - docker.image("rokoch/ium:01").inside { - sh 'rm -rf ium_426206' - sh 'git clone https://git.wmi.amu.edu.pl/s426206/ium_426206.git' - sh "chmod +x ium_426206/stats.sh" - sh "ium_426206/stats.sh | tee output.txt" - archiveArtifacts 'output.txt' - } + //docker.withRegistry("https://hub.docker.com/r/rokoch/ium"){ + docker.image("rokoch/ium:01").inside { + sh 'rm -rf ium_426206' + sh 'git clone https://git.wmi.amu.edu.pl/s426206/ium_426206.git' + sh "chmod +x ium_426206/stats.sh" + sh "ium_426206/stats.sh | tee output.txt" + archiveArtifacts 'output.txt' + } + //} } } } From b31807068321adbfc331967324735da72b57bbde Mon Sep 17 00:00:00 2001 From: Jan Nowak Date: Sat, 10 Apr 2021 23:34:12 +0200 Subject: [PATCH 55/55] added CUTOFF parametr to script in docker jenkinsfile. --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 07389d0..26ab535 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,7 +34,7 @@ pipeline { def img = docker.build('rokoch/ium:01') img.inside { sh 'chmod +x skrypt.sh' - sh './skrypt.sh 0' + sh './skrypt.sh $CUTOFF' } } }