added dataset stats shell scriptand jenkins file

This commit is contained in:
Maciej Tyczynski 2023-04-19 18:40:46 +02:00
parent 2ec06fc63d
commit 822bb53727
3 changed files with 50 additions and 0 deletions

38
Jenkinsfile-dataset_stats Normal file
View File

@ -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
}
}
}
}
}

12
datastats.sh Normal file
View File

@ -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

View File