This commit is contained in:
vagrant 2020-04-23 06:53:05 +00:00
commit 8b9cc7b424
3 changed files with 64 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM ubuntu:latest
RUN apt update -y && apt install -y make
RUN apt install -y git
RUN apt install -y gcc
RUN gcc --version
RUN apt install -y build-essential
RUN apt-get update && apt-get install -y python3
RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install matplotlib

28
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,28 @@
pipeline {
agent { dockerfile true }
stages {
stage('checkoutGit') {
steps {
git 'https://git.wmi.amu.edu.pl/s426086/s426086-plots'
}
}
stage('copyArtifacts') {
steps {
copyArtifacts filter: 'wer.txt', fingerprintArtifacts: true, projectName: 's426086-metrics', selector: lastSuccessful()
copyArtifacts filter: 'srr.txt', fingerprintArtifacts: true, projectName: 's426086-metrics', selector: lastSuccessful()
}
}
stage('plots') {
steps {
sh 'chmod a+rwx plot.py'
sh 'python3 plot.py'
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'wer.txt'
archiveArtifacts 'srr.txt'
}
}
}
}

26
plot.py Normal file
View File

@ -0,0 +1,26 @@
import matplotlib.pyplot as plt
fig_wer, ax_wer = plt.subplots()
fig_srr, ax_srr = plt.subplots()
X1, Y1 = [], []
X2, Y2 = [], []
y_num=1
for line in open('wer.txt', 'r'):
Y1.append(float(line[:-1]))
X1.append(y_num)
y_num=y_num+1
ax_wer.plot(X1, Y1)
ax_wer.set_title("WER")
fig_wer.savefig('wer.png')
y_num=1
for line in open('srr.txt', 'r'):
Y2.append(float(line[:-1]))
X2.append(y_num)
y_num=y_num+1
ax_srr.plot(X2, Y2)
ax_srr.set_title("SRR")
fig_srr.savefig('srr.png')