From 127269569b32de2a4313c2563cd2abd6b14edc08 Mon Sep 17 00:00:00 2001 From: Daniel Porzucek Date: Wed, 20 Mar 2024 18:18:48 +0100 Subject: [PATCH] added stats/Jenkinsfile --- Jenkinsfile | 2 +- stats/Jenkinsfile | 20 ++++++++++++++++++++ stats/data_stats.sh | 3 +++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 stats/Jenkinsfile create mode 100644 stats/data_stats.sh diff --git a/Jenkinsfile b/Jenkinsfile index f6229f9..af6f8fe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ pipeline { "KAGGLE_KEY=${KAGGLE_KEY}" ]) { sh 'chmod 777 ./data_download.sh' sh './data_download.sh --cutoff ${CUTOFF}' - archiveArtifacts artifacts: 'test_without_id_column.csv,cutoff_train.csv', followSymlinks: false + archiveArtifacts artifacts: 'test_without_id_column.csv,cutoff_train.csv,test.csv,train.csv', followSymlinks: false } } } diff --git a/stats/Jenkinsfile b/stats/Jenkinsfile new file mode 100644 index 0000000..9d1af80 --- /dev/null +++ b/stats/Jenkinsfile @@ -0,0 +1,20 @@ +pipeline { + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts' + name: 'BUILD_SELECTOR' + ) + } + stages { + stage('Dataset statistics') { + steps { + copyArtifacts filter:'cutoff_train.csv',fingerprintArtifacts: true, projectName: 'z-s495716-create-dataset', selector: buildParameter('BUILD_SELECTOR') + sh 'chmod 777 stats/data_stats.sh' + sh './data_stats.sh' + archiveArtifacts artifacts: 'train_lines.txt', followSymlinks: false + } + } + } +} diff --git a/stats/data_stats.sh b/stats/data_stats.sh new file mode 100644 index 0000000..93bc052 --- /dev/null +++ b/stats/data_stats.sh @@ -0,0 +1,3 @@ +#!/bin/bash +figlet "Counting dataset lines" +wc -l cutoff_train.csv > train_lines.txt