Merge pull request #569 from thockin/v3_e2e_CLEANUP_docker_rm

v3: e2e: $CLEANUP decides whether to rm containers
This commit is contained in:
Kubernetes Prow Robot 2022-07-07 04:45:35 -07:00 committed by GitHub
commit 25b93107c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -73,9 +73,13 @@ function assert_file_contains() {
# Helper: run a docker container.
function docker_run() {
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \
-d \
--rm \
${RM} \
--label git-sync-e2e="$RUNID" \
"$@"
sleep 2 # wait for it to come up
@ -158,9 +162,13 @@ touch $RUNLOG
function GIT_SYNC() {
#./bin/linux_amd64/git-sync "$@"
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \
-i \
--rm \
${RM} \
--label git-sync-e2e="$RUNID" \
--network="host" \
-u $(id -u):$(id -g) \