feat: add --no-cache flag to ps:rebuild
The `ps:rebuild` command now accepts `--no-cache` to perform a single uncached build regardless of builder, without persisting any setting for later deploys. The railpack builder now also honors `--no-cache` when set via `docker-options`, and build records are now correctly attributed when flags precede the app name.
This commit is contained in:
@@ -77,6 +77,10 @@ trigger-builder-herokuish-builder-build() {
|
||||
done < <(fn-docker-args-split "$DOCKER_ARGS")
|
||||
|
||||
local DOKKU_CONTAINER_EXIT_CODE=0
|
||||
if [[ "$DOKKU_BUILD_NO_CACHE" == "true" ]]; then
|
||||
dokku_log_info1 "Clearing build cache"
|
||||
plugn trigger repo-purge-cache "$APP"
|
||||
fi
|
||||
fn-builder-herokuish-ensure-cache "$APP"
|
||||
if ! CID=$("$DOCKER_BIN" container create "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -v "cache-$APP:/cache" --env=CACHE_PATH=/cache "${ARG_ARRAY[@]}" "$IMAGE" /build); then
|
||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||
|
||||
Reference in New Issue
Block a user