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

15
Jenkinsfile vendored
View File

@ -20,14 +20,23 @@ pipeline {
stage('Count metrics'){ stage('Count metrics'){
steps{ steps{
sh label: '', script: './count_metrics.sh wikiniews_results.tsv' sh label: '', script: './count_metrics.sh wikiniews_results.tsv'
archiveArtifacts 'srr.txt' }
archiveArtifacts 'wer.txt' }
archiveArtifacts 'wikiniews_results_with_wer.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'){ stage('Archive results'){
steps{ steps{
archiveArtifacts 'counted_lines.txt' archiveArtifacts 'counted_lines.txt'
archiveArtifacts 'srr.txt'
archiveArtifacts 'wer.txt'
archiveArtifacts 'wikiniews_results_with_wer.tsv'
} }
} }
} }

4
append_to_file.sh Executable file
View File

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