diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..73f69e0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/IUM.iml b/.idea/IUM.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/.idea/IUM.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..da91e99 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..f56ad02 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..599d382 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index bc4c779..ed11aea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,11 +1,27 @@ pipeline{ agent any + properties([parameters([text(defaultValue: '50', description: 'Number of lines to cutoff', name: 'CUTOFF')])]) stages{ stage('Stage 1'){ steps{ echo 'Hello World!' - checkout: Check out from version control - sh: Shell Script + } + } + stage('checkout: Check out from version control'){ + steps{ + git url: 'https://github.com/jfrogdev/project-examples.git' + } + } + stage('sh: Shell Script'){ + steps{ + ./script.sh + } + } + stage('Archive artifacts'){ + steps{ + archiveArtifacts 'test.csv' + archiveArtifacts 'dev.csv' + archiveArtifacts 'train.csv' } } } diff --git a/script.sh b/script.sh new file mode 100755 index 0000000..6a1cb26 --- /dev/null +++ b/script.sh @@ -0,0 +1,10 @@ +#!/bin/bash +curl -OL https://git.wmi.amu.edu.pl/s437622/ium_s437622/src/branch/master/games.csv +head -n -1 games.csv | shuf > chess.csv.shuf +wc -l chess.csv +head -n 2006 chess.csv.shuf > test.csv +head -n 4012 chess.csv.shuf | tail -n 2006 > dev.csv +tail -n +4013 chess.csv.shuf > train.csv +wc -l *.csv + + diff --git a/script.sh.save b/script.sh.save new file mode 100644 index 0000000..43ca332 --- /dev/null +++ b/script.sh.save @@ -0,0 +1,2 @@ +#!/bin/bash +curl -OL https://git.wmi.amu.edu.pl/s437622/ium_s437622/src/branch/master/chess.csv