Page MenuHomePhabricator

[gitian-builder] By default, cleanup the target after use
ClosedPublic

Authored by jasonbcox on Oct 1 2020, 21:48.

Details

Summary

After running gbuild, the VM is left running. This unnecessarily
consumes system resources if left alone.

I don't see a strong rationale for leaving the VM dangling after
running, especially since gbuild always cleans up the old VM at the start
of each execution (see line 54, where stop-target is called). By default,
the VM should be stopped. A new option has been added to override this
behavior, should it be useful in other configurations.

If this review is accepted, I'll open a PR upstream.

Test Plan
OS_NAME=win ./contrib/teamcity/gitian.sh
docker ps -a

Pre-patch, there is a container called gitian-target still running after the build.
Post-patch, there is not.
Editting gitian.sh with ./bin/gbuild --skip-cleanup, the container is once again
left to run.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable