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