diff --git a/Jenkinsfile2 b/Jenkinsfile2 new file mode 100644 index 0000000..b786b9b --- /dev/null +++ b/Jenkinsfile2 @@ -0,0 +1,20 @@ +pipeline { + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + name: 'BUILD_SELECTOR', + description: 'Which build to use for copying artifacts' + ) + } + stages { + stage("Script") { + steps { + copyArtifacts fingerprintArtifacts: true, projectName: 's444507-create-dataset', selector: lastSuccessful() sh " ./stats.sh" + archiveArtifacts 'lines.txt' + sh './stats.sh' + archiveArtifacts artifacts: 'stats.txt' + } + } + } +} \ No newline at end of file diff --git a/stats.sh b/stats.sh new file mode 100755 index 0000000..17b515f --- /dev/null +++ b/stats.sh @@ -0,0 +1,3 @@ +wc -l car_prices.csv.dev > stats.txt +wc -l car_prices.csv.test >> stats.txt +wc -l car_prices.csv.train >> stats.txt \ No newline at end of file