From f4bb29e2c6102aa2f9b4ed5735fb3a5a6d3e8cf7 Mon Sep 17 00:00:00 2001 From: Dawid Date: Sun, 28 Mar 2021 21:38:23 +0200 Subject: [PATCH] Added dataset stats jenkinsfile and script --- Jenkinsfile_stats | 16 ++++++++++++++++ stats.sh | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 Jenkinsfile_stats create mode 100644 stats.sh diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats new file mode 100644 index 0000000..e6033f2 --- /dev/null +++ b/Jenkinsfile_stats @@ -0,0 +1,16 @@ +pipeline { + agent any + parameters { + buildSelector(defaultSelector: lastSuccessful(), description: 'Which build to use for copying artifacts', name: 'BUILD_SELECTOR') + } + stages { + stage("Clone repo & print stats"){ + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 's434804-create-dataset', selector: buildParameter('BUILD_SELECTOR') + sh "chmod 777 ./stats.sh" + sh "./stats.sh" + archiveArtifacts "stats.txt" + } + } + } +} \ No newline at end of file diff --git a/stats.sh b/stats.sh new file mode 100644 index 0000000..7d4dc11 --- /dev/null +++ b/stats.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wc -l ./*.csv > ./stats.txt \ No newline at end of file