From 034c719fec8646e70d2859f7b0fc9a3865bc1817 Mon Sep 17 00:00:00 2001 From: Anna Nowak Date: Sun, 28 Mar 2021 23:46:04 +0200 Subject: [PATCH] Jenkinsfile-stat --- .gitignore | 3 ++- Jenkinsfile-stat | 36 ++++++++++++++++++++++++++++++++++++ script_stat.sh | 4 ++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 Jenkinsfile-stat create mode 100644 script_stat.sh diff --git a/.gitignore b/.gitignore index c1942b2..f0d0cd8 100644 --- a/.gitignore +++ b/.gitignore @@ -57,4 +57,5 @@ docs/source/changelog.md #fifa dataset fifa19* -*.csv \ No newline at end of file +*.csv +stat.txt \ No newline at end of file diff --git a/Jenkinsfile-stat b/Jenkinsfile-stat new file mode 100644 index 0000000..2c42d9b --- /dev/null +++ b/Jenkinsfile-stat @@ -0,0 +1,36 @@ +pipeline { + agent any + parameters{ + BuildSelector( + defaultSelector: lastSuccessful(), + description: '', + name: 'which_build' + ) + } + stages { + stage('checkout: Check out from version control') { + steps { + git 'https://git.wmi.amu.edu.pl/s434760/ium_434760.git' + } + } + stage('copy artifacts') + { + steps + { + copyArtifacts filter: 'test.csv,data_shuf.csv,validation.csv,train.csv,header.csv', fingerprintArtifacts: true, projectName: 's434760-create-dataset', selector: params.which_build + } + } + stage('sh: Shell Script') + { + steps { + sh "chmod 777 ./script_stat.sh" + sh './script_stat.sh' + } + } + stage('archive artifacts') { + steps { + archiveArtifacts 'stat.txt' + } + } + } +} \ No newline at end of file diff --git a/script_stat.sh b/script_stat.sh new file mode 100644 index 0000000..5b910d6 --- /dev/null +++ b/script_stat.sh @@ -0,0 +1,4 @@ +wc -l data_shuf.csv >> stat.txt +wc -l train.csv >> stat.txt +wc -l test.csv >> stat.txt +wc -l validation.csv >> stat.txt \ No newline at end of file