From 58c31c3a9f1d5012eea161f82b84301dd1e55dda Mon Sep 17 00:00:00 2001 From: Andrzej Preibisz Date: Sun, 27 Mar 2022 14:07:32 +0200 Subject: [PATCH] Added dataset-stats --- Jenkinsfile.stats | 28 ++++++++++++++++++++++++++++ dataset_stats.sh | 6 ++++++ 2 files changed, 34 insertions(+) create mode 100644 Jenkinsfile.stats create mode 100644 dataset_stats.sh diff --git a/Jenkinsfile.stats b/Jenkinsfile.stats new file mode 100644 index 0000000..d7f01db --- /dev/null +++ b/Jenkinsfile.stats @@ -0,0 +1,28 @@ +pipeline { + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + stages { + stage('Copy artifacts') { + steps { + copyArtifacts filter: 'heart_2020_test.csv, heart_2020_train.csv, heart_2020_sorted.csv', fingerprintArtifacts: true, projectName: 's444465-create-dataset', selector: BUILD_SELECTOR + } + } + stage("Git clone"){ + steps{ + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444465', url: 'https://git.wmi.amu.edu.pl/s444465/ium_444465']]]) + } + } + stage("sh: Shell Script") { + steps { + sh "./dataset_stats.sh | tee stats.txt" + archiveArtifacts artifacts: "stats.txt", onlyIfSuccessful: true + } + } + } +} \ No newline at end of file diff --git a/dataset_stats.sh b/dataset_stats.sh new file mode 100644 index 0000000..9f99a4e --- /dev/null +++ b/dataset_stats.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +echo "test dataset: " +wc -l heart_2020_test.csv +echo "train dataset: " +wc -l heart_2020_train.csv \ No newline at end of file