From 9dcf17be6931855da78932ff6145b82cdc3b8f8d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 18 Jun 2020 11:14:41 -0400 Subject: [PATCH] fix: filter resource args from deploy tasks As specified in the docs, the build process should not be impacted by resource constraints. --- plugins/app-json/internal-functions | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/app-json/internal-functions b/plugins/app-json/internal-functions index c3abb5625..5d36a82b0 100755 --- a/plugins/app-json/internal-functions +++ b/plugins/app-json/internal-functions @@ -82,8 +82,11 @@ execute_script() { [[ -d $CACHE_DIR ]] || mkdir -p "$CACHE_DIR" local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG") - # strip --restart args from DOCKER_ARGS - local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS") + # strip certain args from DOCKER_ARGS + local filtered_args=("restart" "cpu" "memory" "memory-swap" "network" "network-ingress" "network-egress" "nvidia-gpu") + for filtered_arg in "${filtered_args[@]}"; do + DOCKER_ARGS=$(sed -e "s/--${filtered_arg}=[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS") + done local IMAGE_SOURCE_TYPE="dockerfile" is_image_herokuish_based "$IMAGE" "$APP" && IMAGE_SOURCE_TYPE="herokuish"