Task 3 - metrics - starting point

This commit is contained in:
s452111 2020-04-21 22:40:42 +02:00
parent 46b757b410
commit 6abc67535a
2 changed files with 13 additions and 0 deletions

3
Jenkinsfile vendored
View File

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

10
metrics_service.sh Normal file
View File

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