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 { steps {
script { script {
dockerImageObj.inside() { dockerImageObj.inside() {
sh 'echo "INSIDE CONTAINER!"' sh 'echo "Performing application tests inside sos-milter container..."'
sh '/usr/bin/python3 /app/sos-milter.py &' sh 'export MILTER_SOCKET=inet:8020 && /usr/bin/python3 /app/sos-milter.py &'
sh 'sleep 5; if [ -S /socket/sos-milter ]; then exit 0; else exit 1; fi' 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 \ && apt-get -qq --no-install-recommends install \
python3-pip python3-setuptools \ python3-pip python3-setuptools \
libmilter1.0.1 libmilter-dev procps net-tools \ 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 pymilter \
&& /usr/bin/pip3 install dnspython \ && /usr/bin/pip3 install dnspython \
&& /bin/mkdir /config /socket /app \ && /bin/mkdir /config /socket /app \