Calculating dataset stats

This commit is contained in:
s444380 2022-03-27 12:52:38 +02:00
parent 0982b860c3
commit e0b89db85c
2 changed files with 36 additions and 0 deletions

28
Jenkinsfile.stats Normal file
View File

@ -0,0 +1,28 @@
pipeline {
agent any
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
stage('Copy artifacts') {
steps {
copyArtifacts fingerprintArtifacts: true, projectName: 's444380-create-dataset', selector: buildParameter('BUILD_SELECTOR')
}
}
stage("Checkout git") {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444380', url: 'https://git.wmi.amu.edu.pl/s444380/ium_444380.git']]])
}
}
stage("Calcualte statistics") {
steps {
sh "./calc_stats.sh | tee crime.stats.txt"
archiveArtifacts artifacts: "crime.stats.txt", onlyIfSuccessful: true
}
}
}
}

8
calc_stats.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo "crime.test: "
wc -l crime.test
echo "crime.dev: "
wc -l crime.dev
echo "crime.train: "
wc -l crime.train