diff --git a/Jenkinsfile-dataset_stats b/Jenkinsfile-dataset_stats new file mode 100644 index 0000000..69cb91a --- /dev/null +++ b/Jenkinsfile-dataset_stats @@ -0,0 +1,38 @@ +pipeline { + agent any + properties([parameters([ + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR') + ])]) + + stage('Clone repository') { + steps { + git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487176/ium_487176' + } + } + stage('Copy Artifacts') { + steps { + script { + projectName: 'z-s487176-create-dataset', + fingerprintArtifacts: true, + selector: buildParameter('BUILD_SELECTOR') + } + } + } + + stage('Run script') { + steps { + sh 'sh datastats.sh' + } + post { + always { + archiveArtifacts artifacts: 'stats.txt', allowEmptyArchive: true + } + } + } + + + } +} diff --git a/datastats.sh b/datastats.sh new file mode 100644 index 0000000..2feb706 --- /dev/null +++ b/datastats.sh @@ -0,0 +1,12 @@ +#!/bin/bash +echo "Test lines: ">stats.txt + +wc -l < test.csv >> stats.txt + +echo "Train lines: ">>stats.txt + +wc -l < train.csv >> stats.txt + +echo $"Validation lines: ">>stats.txt + +wc -l < val.csv >> stats.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000