diff --git a/Jenkinsfile b/Jenkinsfile index 60ef4f3..03c7571 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,5 +19,10 @@ pipeline { archiveArtifacts 'wikiniews_results_wer.tsv' } } + stage('Draw plots'){ + steps{ + build 's416178-plots' + } + } } } diff --git a/Jenkinsfile_plots b/Jenkinsfile_plots new file mode 100644 index 0000000..dfb3d3d --- /dev/null +++ b/Jenkinsfile_plots @@ -0,0 +1,20 @@ +pipeline { + agent { dockerfile true } + + stages { + stage('Prepare environment') { + steps { + git 'https://git.wmi.amu.edu.pl/s416178/s416178-mlworkshops' + copyArtifacts filter: 'srr.txt, wer.txt', fingerprintArtifacts: true, optional: true, projectName: 's416178-metrics', target: './' + } + } + stage('Draw and save plots') { + steps { + sh('chmod +x ./draw_plots.sh') + sh('./draw_plots.sh wer.txt srr.txt') + archiveArtifacts 'wer.png' + archiveArtifacts 'srr.png' + } + } + } +} diff --git a/draw_plots.sh b/draw_plots.sh new file mode 100644 index 0000000..2912d05 --- /dev/null +++ b/draw_plots.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +for FILE in "$@" +do + gnuplot <<- EOF + set term png + set output "${FILE}.png" + plot "${FILE}" using 1 +EOF +done