From ae4f2e9d0141cc67e00c47ea752f2cf75af759f8 Mon Sep 17 00:00:00 2001 From: massta Date: Fri, 3 Apr 2020 16:36:32 +0200 Subject: [PATCH] zad3 teest13 --- Dockerfile | 1 + count2.sh | 4 ++++ jenkinsfile | 5 ++--- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 count2.sh diff --git a/Dockerfile b/Dockerfile index bf3941c..63680fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ RUN apt install -y git RUN apt install -y gcc RUN gcc --version RUN apt install -y build-essential +RUN apt-get install num-utils RUN git clone https://github.com/usnistgov/SCTK.git WORKDIR SCTK RUN make config && make all && make check && make install && make doc diff --git a/count2.sh b/count2.sh new file mode 100644 index 0000000..aa9d5c3 --- /dev/null +++ b/count2.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cat output.txt | awk '{print (($7 + $8 + $9)/($7 + $8 + $6))*100;}' > clear.txt +avg=$(num-average clear.txt) +echo "Medium: $avg" >> clear.txt diff --git a/jenkinsfile b/jenkinsfile index 35bf6a9..bc27266 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -13,14 +13,13 @@ copyArtifacts filter: 'wikiniews_results.tsv', fingerprintArtifacts: true, proje } stage('Count words') { steps { -sh label: '', script: 'ls' sh label: '', script: './count.sh wikiniews_results.tsv' +sh label: '', script: './count2.sh wikiniews_results.tsv' } } stage('Archive atifacts') { steps { -archiveArtifacts 'file.txt' -archiveArtifacts 'output.txt' +archiveArtifacts 'clear.txt' } } }