init
This commit is contained in:
commit
18d6075997
10
Dockerfile
Normal file
10
Dockerfile
Normal 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
|
27
Jenkinsfile
vendored
Normal file
27
Jenkinsfile
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
pipeline {
|
||||
agent { dockerfile true }
|
||||
stages {
|
||||
stage('checkoutGit') {
|
||||
steps {
|
||||
git 'https://git.wmi.amu.edu.pl/s432211/s432211-plots'
|
||||
}
|
||||
}
|
||||
stage('copyArtifacts') {
|
||||
steps {
|
||||
copyArtifacts filter: 'wer.txt', fingerprintArtifacts: true, projectName: 's432211-metrics', selector: lastSuccessful()
|
||||
copyArtifacts filter: 'srr.txt', fingerprintArtifacts: true, projectName: 's432211-metrics', selector: lastSuccessful()
|
||||
}
|
||||
}
|
||||
stage('plots') {
|
||||
steps {
|
||||
sh 'chmod a+rwx plot.py'
|
||||
sh 'python3 plot.py'
|
||||
}
|
||||
}
|
||||
stage('archiveArtifacts') {
|
||||
steps {
|
||||
archiveArtifacts 'plot.png'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
26
plot.py
Normal file
26
plot.py
Normal file
@ -0,0 +1,26 @@
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
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
|
||||
|
||||
y_num = 1
|
||||
for line in open('srr.txt', 'r'):
|
||||
Y2.append(float(line[:-1]))
|
||||
X2.append(y_num)
|
||||
y_num = y_num+1
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
plt.xticks(X1)
|
||||
plt.title("WER SRR")
|
||||
plt.xlabel("Number")
|
||||
plt.ylabel("Value")
|
||||
plt.plot(X1, Y1)
|
||||
plt.plot(X1, Y2)
|
||||
ax.legend(["WER", "SRR"])
|
||||
plt.savefig('plot.png')
|
Loading…
Reference in New Issue
Block a user