script/cibuild was a plain `docker build .` and the Dockerfile does `COPY . .` followed by `RUN make check`, so on an unchanged tree Docker served the check layer from cache: the suite never ran and the build still exited 0. Measured here before the change, a second run on a byte-identical tree returned in 0.286s with `RUN make check` CACHED. script/cibuild and script/docker now pass --no-cache. The canonical text asserting that a bare `docker build .` proves the checks ran was wrong in REPO_POLICIES.md, both checklists and the Go styleguide, and is corrected in all of them. Model: opus-5
17 lines
447 B
Bash
Executable File
17 lines
447 B
Bash
Executable File
#!/bin/sh
|
|
# script/docker: build the Docker image tagged with the project name.
|
|
# Identical in all repos; the tag comes from script/projectname.
|
|
# --no-cache for the same reason as script/cibuild: a cached check layer
|
|
# is a check that did not run.
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
docker build --no-cache -t "$("$SCRIPT_DIR/projectname")" .
|
|
}
|
|
|
|
main "$@"
|