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:
Jose Diaz-Gonzalez committed 2026-10-29 14:25:51 -04:00
1 parent 6e9ae25925
commit f3b21babcc
27 files changed
+316 -9

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ package ps
import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"
@@ -26,7 +27,11 @@ func CommandInspect(appName string) error {
}
// CommandRebuild rebuilds an app from source
func CommandRebuild(appName string, allApps bool, parallelCount int) error {
func CommandRebuild(appName string, allApps bool, parallelCount int, noCache bool) error {
if noCache {
os.Setenv("DOKKU_BUILD_NO_CACHE", "true")
}
if allApps {
return common.RunCommandAgainstAllApps(Rebuild, "rebuild", parallelCount)
}