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