diff --git a/Jenkinsfile b/Jenkinsfile index 035501f..ec4b8af 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,11 +21,14 @@ pipeline { steps { sh 'chmod +x ./service.sh' sh './service.sh' + sh 'chmod +x ./metrics_service.sh' + sh './metrics_service.sh' } } stage('Archive artifacts') { steps { archiveArtifacts 'lines_count.txt' + archiveArtifacts 'wikiniews_results.tsv' } } } diff --git a/metrics_service.sh b/metrics_service.sh new file mode 100644 index 0000000..32dee9d --- /dev/null +++ b/metrics_service.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Prepare hypothesis file based on column 2 +cut -f2 'wikiniews_results.tsv' > hypothesis.txt +# Prepare reference file based on column 3 +cut -f3 'wikiniews_results.tsv' > reference.txt + +# awk transfer txt to .trn +awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < referencje.txt > reference.trn +awk 'BEGIN{FS=OFS="\t"}{print $0,"(sp1_"NR")"}' < hipotezy.txt > hypothesis.trn