Check builds use Docker's normal cache
check / check (push) Failing after 1m53s

Drop --no-cache from every docker build in script/: an unchanged tree
needs no rerun.

Model: opus-5-5
This commit is contained in:
clawbot committed 2026-11-16 21:48:28 +00:00
1 parent a2fcc00ded
commit 988f117ef3
6 files changed
+9 -18

No files matched your search

+1 -4
View File
@@ -2,9 +2,6 @@
# script/cibuild: run the CI build. It bootstraps first: a CI runner # script/cibuild: run the CI build. It bootstraps first: a CI runner
# checks out and runs this and nothing else, and script/fmt-check runs # checks out and runs this and nothing else, and script/fmt-check runs
# the formatter on the host, which a pristine checkout cannot do. # the formatter on the host, which a pristine checkout cannot do.
# --no-cache for the same reason as script/docker: the gate phases the
# final stage depends on are RUN steps, and a cached one is a check that
# did not run.
set -eu set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
@@ -20,7 +17,7 @@ main() {
# the version a build stage derives from the .git in the context. # the version a build stage derives from the .git in the context.
version="$(git describe --tags --always --dirty 2>/dev/null || true)" version="$(git describe --tags --always --dirty 2>/dev/null || true)"
[ -n "$version" ] || version="unknown" [ -n "$version" ] || version="unknown"
docker build --no-cache \ docker build \
--build-arg VERSION="$version" \ --build-arg VERSION="$version" \
-t "$("$SCRIPT_DIR/projectname")" . -t "$("$SCRIPT_DIR/projectname")" .
} }
+1 -3
View File
@@ -1,8 +1,6 @@
#!/bin/sh #!/bin/sh
# script/docker: build the Docker image tagged with the project name. # script/docker: build the Docker image tagged with the project name.
# Identical in all repos; the tag comes from script/projectname. # Identical in all repos; the tag comes from script/projectname.
# --no-cache because the gate phases the final stage depends on are RUN
# steps, and a cached one is a check that did not run.
set -eu set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
@@ -16,7 +14,7 @@ main() {
# the version a build stage derives from the .git in the context. # the version a build stage derives from the .git in the context.
version="$(git describe --tags --always --dirty 2>/dev/null || true)" version="$(git describe --tags --always --dirty 2>/dev/null || true)"
[ -n "$version" ] || version="unknown" [ -n "$version" ] || version="unknown"
docker build --no-cache \ docker build \
--build-arg VERSION="$version" \ --build-arg VERSION="$version" \
-t "$("$SCRIPT_DIR/projectname")" . -t "$("$SCRIPT_DIR/projectname")" .
} }
+2 -2
View File
@@ -170,8 +170,8 @@ main() {
trap cleanup EXIT trap cleanup EXIT
trap 'exit 1' HUP INT TERM trap 'exit 1' HUP INT TERM
docker build --no-cache -t "$IMAGE" . docker build -t "$IMAGE" .
docker build --no-cache --build-arg SWW_IMAGE="$IMAGE" \ docker build --build-arg SWW_IMAGE="$IMAGE" \
-t "$APP_IMAGE" deploy/example-app -t "$APP_IMAGE" deploy/example-app
docker network create "$NETWORK" >/dev/null docker network create "$NETWORK" >/dev/null
+2 -3
View File
@@ -5,8 +5,7 @@
# make its answer untrustworthy. # make its answer untrustworthy.
# #
# The phase is not the last stage in the file, so it is built only when # The phase is not the last stage in the file, so it is built only when
# --target names it. --no-cache because a cached lint layer is a lint # --target names it. The tag makes each build replace the previous image
# that did not run. The tag makes each build replace the previous image
# instead of leaving a dangling one behind. # instead of leaving a dangling one behind.
set -eu set -eu
@@ -15,7 +14,7 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
main() { main() {
cd "$ROOT" cd "$ROOT"
docker build --no-cache \ docker build \
--target lint \ --target lint \
-t "$("$SCRIPT_DIR/projectname")-lint" . -t "$("$SCRIPT_DIR/projectname")-lint" .
} }
+2 -3
View File
@@ -2,8 +2,7 @@
# script/test: run the test suite. Testing is a phase of the Dockerfile # script/test: run the test suite. Testing is a phase of the Dockerfile
# and this builds that phase alone, on the same terms as script/lint: # and this builds that phase alone, on the same terms as script/lint:
# --target because a phase that is not the last stage is built only when # --target because a phase that is not the last stage is built only when
# named, --no-cache because a cached test layer is a test that did not # named, and a tag so each build replaces the previous image.
# run, and a tag so each build replaces the previous image.
set -eu set -eu
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)" SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
@@ -11,7 +10,7 @@ ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
main() { main() {
cd "$ROOT" cd "$ROOT"
docker build --no-cache \ docker build \
--target test \ --target test \
-t "$("$SCRIPT_DIR/projectname")-test" . -t "$("$SCRIPT_DIR/projectname")-test" .
} }
+1 -3
View File
@@ -3,15 +3,13 @@
# the test phase of the Dockerfile checks. This builds the Dockerfile's # the test phase of the Dockerfile checks. This builds the Dockerfile's
# tidy-files stage, which holds the two files alone, and --output writes # tidy-files stage, which holds the two files alone, and --output writes
# them into the working tree. The build makes no image, so it has no tag. # them into the working tree. The build makes no image, so it has no tag.
# --no-cache because `go mod tidy` asks the module proxy, whose answers a
# cached layer would repeat.
set -eu set -eu
ROOT="$(cd "$(dirname "$0")/.." && pwd -P)" ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"
main() { main() {
cd "$ROOT" cd "$ROOT"
docker build --no-cache \ docker build \
--target tidy-files \ --target tidy-files \
--output "type=local,dest=$ROOT" . --output "type=local,dest=$ROOT" .
} }