From 3f38d6f2bb1ce43e243fb6f4e6d60eace3515db2 Mon Sep 17 00:00:00 2001 From: koziej97 Date: Wed, 29 Mar 2023 00:28:55 +0200 Subject: [PATCH] added files for dataset-stats --- Jenkinsfile_stats | 23 +++++++++++++++++++++++ get_stats.sh | 1 + 2 files changed, 24 insertions(+) create mode 100644 Jenkinsfile_stats create mode 100644 get_stats.sh diff --git a/Jenkinsfile_stats b/Jenkinsfile_stats new file mode 100644 index 0000000..dca6ba2 --- /dev/null +++ b/Jenkinsfile_stats @@ -0,0 +1,23 @@ +node { + stage('Preparation') { + properties([ + parameters([ + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + + ]) + ]) + } + stage('Copy artifacts') { + copyArtifacts fingerprintArtifacts: true, projectName: 's425850-create-dataset', selector: buildParameter('BUILD_SELECTOR') + } + stage('Script') { + sh 'chmod u+x ./get_stats.sh' + sh './get_stats.sh' + } + stage('Archive artifacts') { + archiveArtifacts artifacts: 'stats.txt', followSymlinks: false + } +} \ No newline at end of file diff --git a/get_stats.sh b/get_stats.sh new file mode 100644 index 0000000..8dd407f --- /dev/null +++ b/get_stats.sh @@ -0,0 +1 @@ +wc -l books_edited.csv > stats.txt \ No newline at end of file