check / check (push) Successful in 7m45s
Both scripts pass a new CHECK_EPOCH, which the Dockerfile's make fmt-check, make lint and make test steps name in their commands. On an unchanged tree Docker used to serve those steps from its build cache, so a run could pass without checking anything. The script/bootstrap steps stay cached. A plain docker build . still works, as upaas builds the image that way: it leaves CHECK_EPOCH empty and reuses the check steps only for an identical build context. Model: opus-5-5
20 lines
551 B
Bash
Executable File
20 lines
551 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. Like
|
|
# script/cibuild, it passes a new CHECK_EPOCH, so the build runs the
|
|
# checks instead of reusing cached results. Generic: needs no
|
|
# adaptation.
|
|
set -eu
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|
ROOT="$(cd "$SCRIPT_DIR/.." && pwd -P)"
|
|
|
|
main() {
|
|
cd "$ROOT"
|
|
epoch="$(date +%s)$$"
|
|
docker build --build-arg CHECK_EPOCH="$epoch" \
|
|
-t "$("$SCRIPT_DIR/projectname")" .
|
|
}
|
|
|
|
main "$@"
|