Jenkins docker.inside()

This commit is contained in:
Dominik Chilla 2019-06-17 20:55:43 +02:00
parent 4c010af6c2
commit cf5004fcc6
2 changed files with 4 additions and 4 deletions

6
Jenkinsfile vendored
View File

@ -25,9 +25,9 @@ pipeline {
steps {
script {
dockerImageObj.inside() {
sh 'echo "INSIDE CONTAINER!"'
sh '/usr/bin/python3 /app/sos-milter.py &'
sh 'sleep 5; if [ -S /socket/sos-milter ]; then exit 0; else exit 1; fi'
sh 'echo "Performing application tests inside sos-milter container..."'
sh 'export MILTER_SOCKET=inet:8020 && /usr/bin/python3 /app/sos-milter.py &'
sh 'sleep 5; /bin/nc -z -n -v -w 1 127.0.0.1 8020 || exit 1'
}
}
}

View File

@ -12,7 +12,7 @@ RUN env; set -ex ; \
&& apt-get -qq --no-install-recommends install \
python3-pip python3-setuptools \
libmilter1.0.1 libmilter-dev procps net-tools \
gcc python3-dev \
gcc python3-dev netcat-traditional \
&& /usr/bin/pip3 install pymilter \
&& /usr/bin/pip3 install dnspython \
&& /bin/mkdir /config /socket /app \