Merge pull request #570 from thockin/v4_e2e_CLEANUP_docker_rm

v4: e2e: $CLEANUP decides whether to rm containers
This commit is contained in:
Kubernetes Prow Robot 2022-07-07 04:43:34 -07:00 committed by GitHub
commit 344f3ecd09
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. # Helper: run a docker container.
function docker_run() { function docker_run() {
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \ docker run \
-d \ -d \
--rm \ ${RM} \
--label git-sync-e2e="$RUNID" \ --label git-sync-e2e="$RUNID" \
"$@" "$@"
sleep 2 # wait for it to come up sleep 2 # wait for it to come up
@ -158,9 +162,13 @@ touch $RUNLOG
function GIT_SYNC() { function GIT_SYNC() {
#./bin/linux_amd64/git-sync "$@" #./bin/linux_amd64/git-sync "$@"
RM="--rm"
if [[ "${CLEANUP:-}" == 0 ]]; then
RM=""
fi
docker run \ docker run \
-i \ -i \
--rm \ ${RM} \
--label git-sync-e2e="$RUNID" \ --label git-sync-e2e="$RUNID" \
--network="host" \ --network="host" \
-u $(id -u):$(id -g) \ -u $(id -u):$(id -g) \