Accumulate results

This commit is contained in:
Artur Nowakowski 2020-04-03 13:24:34 +02:00
parent e203493f11
commit 5fdd44cf5c
2 changed files with 18 additions and 5 deletions

19
Jenkinsfile vendored
View File

@ -20,15 +20,24 @@ pipeline {
stage('Count metrics'){
steps{
sh label: '', script: './count_metrics.sh wikiniews_results.tsv'
}
}
stage('Accumulate metrics results'){
steps{
copyArtifacts filter: 'srr.txt, wer.txt', fingerprintArtifacts: true, optional: true, projectName: 's416138-metrics', target: 'last-results'
if(fileExists('last-results/srr.txt') && fileExists('last-results/wer.txt')){
sh label: '', script: './append_to_file.sh last-results/srr.txt srr.txt'
sh label: '', script: './append_to_file.sh last-results/wer.txt wer.txt'
}
}
}
stage('Archive results'){
steps{
archiveArtifacts 'counted_lines.txt'
archiveArtifacts 'srr.txt'
archiveArtifacts 'wer.txt'
archiveArtifacts 'wikiniews_results_with_wer.tsv'
}
}
stage('Archive results'){
steps{
archiveArtifacts 'counted_lines.txt'
}
}
}
}

4
append_to_file.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
mv $1 $1.last
tail -1000 $1.last >> $2