Actions
Bug #3660
closedTTCN3 Jenkins jobs leave Docker containers running when stopped
Start date:
10/17/2018
Due date:
% Done:
100%
Spec Reference:
Description
The jenkins.sh scripts start multiple containers and stops them at the end of the script. When aborting a job with the web interface, the script gets killed and can not do the clean up part. Jenkins kills all child processes, but not the containers as they get spawned by the docker daemon.
Ideas to resolve this:- open a bug report at Jenkins to not kill processes with -9 in a bug report, then wait for a stable release with the fix, then implement clean up on receiving SIGABRT in jenkins.sh
- try out the PostBuildScript Plugin (or Post build task, that should work for sure), see if they allow executing code on abort of the job
- try to attach the environment variable that jenkins is using to decide which processes will be killed (see link above) to the processes in the Docker containers
Checklist
- fix lands in jenkins master
- fix lands in jenkins release
- release with fix is deployed on jenkins.osmocom.org
- verify that trap with cleanup function on TERM is working now
- write proper cleanup function to stop docker containers and use it in the jenkins.sh scripts of docker-playground.git
Actions