Skip to content

Commit

Permalink
Merge pull request #324 from furushchev/remove-ps-kill
Browse files Browse the repository at this point in the history
[travis_jenkins.py] delete: remove containers more than 48 hours ago
  • Loading branch information
k-okada authored Feb 14, 2017
2 parents 3610eec + 4c231c8 commit 84bb819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ see [this document](https://github.com/jsk-ros-pkg/jsk_common#restart-travis-fro
* `USE_DOCKER` (default: `false`)

Force to use docker on travis.

* `DOCKER_RUN_OPTION` (default: `--rm`)

Options passed to `docker run` if `USE_DOCKER` is `true`. Ignored otherwise.
**NOTE** If `--rm` is not set, the container remains even after job is finished. You must be responsible for removing it.

* `USE_JENKINS` (default: `false`)

Expand Down
7 changes: 0 additions & 7 deletions travis_jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@
mkdir .travis; cp -r * .travis # need to copy, since directory starting from . is ignoreed by catkin build
fi
# remove containers created/exited more than 48 hours ago
timeout 10s sudo docker ps -a > /tmp/$$.docker_ps_a.txt || exit 1 # check docker isn't held up
for container in `cat /tmp/$$.docker_ps_a.txt | egrep '^.*days ago' | awk '{print $1}'`; do
sudo docker rm $container || echo ok
done
rm -f /tmp/$$.docker_ps_a.txt
# run watchdog for kill orphan docker container
.travis/travis_watchdog.py %(DOCKER_CONTAINER_NAME)s --sudo &
Expand Down

0 comments on commit 84bb819

Please sign in to comment.