Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
451323f
Add Docker support
sjoelund Nov 16, 2020
d6e396b
Add psutil to dependencies
sjoelund Nov 16, 2020
bcdeef0
Docker in docker
sjoelund Nov 16, 2020
9fc1636
Change Jenkinsfile
sjoelund Nov 16, 2020
6e7df25
script, not steps anymore
sjoelund Nov 16, 2020
209e4e3
script must be inside steps
sjoelund Nov 16, 2020
67ddd51
Avoid timeout
sjoelund Nov 16, 2020
d35c567
Call docker pull directly
sjoelund Nov 16, 2020
267a6bd
Fix error when deleting instance
sjoelund Nov 16, 2020
6bb4744
Debug docker top
sjoelund Nov 16, 2020
e34728e
WIP
sjoelund Nov 16, 2020
b384ce9
WIP
sjoelund Nov 16, 2020
e3700a8
WIP
sjoelund Nov 16, 2020
cfb3a72
WIP
sjoelund Nov 16, 2020
cdd9ae6
Use --pid=host
sjoelund Nov 16, 2020
324f474
WIP
sjoelund Nov 16, 2020
4578f59
WIP
sjoelund Nov 16, 2020
8a4d7e8
Use host network, too
sjoelund Nov 16, 2020
ff10c60
WIP
sjoelund Nov 16, 2020
09a87e4
WIP
sjoelund Nov 16, 2020
477b42a
Fix for Windows?
sjoelund Nov 16, 2020
3964e80
WIP
sjoelund Nov 16, 2020
41310cb
Fix windows?
sjoelund Nov 16, 2020
2066a3b
Fix win?
sjoelund Nov 16, 2020
7067909
Skip changing process on Windows
sjoelund Nov 16, 2020
eea6009
WIP
sjoelund Nov 16, 2020
feb5447
Add psutil
sjoelund Nov 16, 2020
7c5ba41
Add a port option to force a port
sjoelund Nov 16, 2020
e227eff
Maybe fix Windows network issues?
sjoelund Nov 17, 2020
9d50ead
WIP
sjoelund Nov 17, 2020
2f43d45
Check for dockerCid is None
sjoelund Nov 17, 2020
b6c8a3b
Increase timeout to 10s
sjoelund Nov 17, 2020
e0628b0
Add more exceptions for timeout
sjoelund Nov 17, 2020
62cf7f4
Timeout error for docker
sjoelund Nov 17, 2020
0ea656b
WIP
sjoelund Nov 17, 2020
018c088
Use 1.16.1 and test port=11111
sjoelund Nov 17, 2020
7151d6d
Increase version to 3.3.0
sjoelund Nov 17, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jenkins/python2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install -qy --no-install-recommends omc \
&& rm -rf /var/lib/apt/lists/*
RUN pip2 install --no-cache pytest
RUN pip2 install --no-cache pytest psutil
2 changes: 1 addition & 1 deletion .jenkins/python3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ RUN apt-get update \
&& apt-get update \
&& apt-get install -qy --no-install-recommends omc \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache pytest
RUN pip3 install --no-cache pytest psutil
48 changes: 26 additions & 22 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,42 @@ pipeline {
parallel {
stage('python2') {
agent {
dockerfile {
// Large image with full OpenModelica build dependencies; lacks omc and OMPython
label 'linux'
dir '.jenkins/python2'
additionalBuildArgs '--pull'
}
label 'linux'
}
steps {
sh 'python2 setup.py build'
timeout(3) {
sh 'python2 /usr/local/bin/py.test -v --junitxml py2.xml tests'
script {
def deps = docker.build('ompython-jenkins-python2', '--pull .jenkins/python2')
def dockergid = sh (script: 'stat -c %g /var/run/docker.sock', returnStdout: true).trim()
sh "docker pull openmodelica/openmodelica:v1.16.1-minimal" // Avoid timeout
deps.inside("-v /var/run/docker.sock:/var/run/docker.sock --network=host --pid=host --group-add '${dockergid}'") {
sh 'python2 setup.py build'
timeout(3) {
sh 'python2 /usr/local/bin/py.test -v --junitxml py2.xml tests'
}
sh 'HOME="$PWD" python2 setup.py install --user'
}
junit 'py2.xml'
}
sh 'HOME="$PWD" python2 setup.py install --user'
junit 'py2.xml'
}
}
stage('python3') {
agent {
dockerfile {
// Large image with full OpenModelica build dependencies; lacks omc and OMPython
label 'linux'
dir '.jenkins/python3'
additionalBuildArgs '--pull'
}
label 'linux'
}
steps {
sh 'python3 setup.py build'
timeout(3) {
sh 'python3 /usr/local/bin/py.test -v --junitxml py3.xml tests'
script {
def deps = docker.build('ompython-jenkins-python3', '--pull .jenkins/python3')
def dockergid = sh (script: 'stat -c %g /var/run/docker.sock', returnStdout: true).trim()
sh "docker pull openmodelica/openmodelica:v1.16.1-minimal" // Avoid timeout
deps.inside("-v /var/run/docker.sock:/var/run/docker.sock --network=host --pid=host --group-add '${dockergid}'") {
sh 'python3 setup.py build'
timeout(3) {
sh 'python3 /usr/local/bin/py.test -v --junitxml py3.xml tests'
}
sh 'HOME="$PWD" python3 setup.py install --user'
}
junit 'py3.xml'
}
sh 'HOME="$PWD" python3 setup.py install --user'
junit 'py3.xml'
}
}
}
Expand Down
Loading