Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca36d0372c |
No files matched your search
@@ -49,9 +49,9 @@ with your task.
|
|||||||
`--target` names it, so a lost `COPY --from=` edge leaves `docker build .`
|
`--target` names it, so a lost `COPY --from=` edge leaves `docker build .`
|
||||||
passing while the gate never runs. Confirm by planting a violation, not by
|
passing while the gate never runs. Confirm by planting a violation, not by
|
||||||
reading the file.
|
reading the file.
|
||||||
- [ ] No `docker build` in `script/` passes `--no-cache` or a cache-busting
|
- [ ] Check builds use Docker's normal cache: no `docker build` in `script/`
|
||||||
build argument such as `CACHEBUST`, and no `Dockerfile` stage declares
|
passes a build argument whose only job is to make steps run again, and no
|
||||||
`ARG CACHEBUST`.
|
`Dockerfile` stage declares one.
|
||||||
- [ ] Go: each Go stage downloads the modules (`COPY go.mod go.sum ./`,
|
- [ ] Go: each Go stage downloads the modules (`COPY go.mod go.sum ./`,
|
||||||
`RUN go mod download`) before `COPY . .`; the steps that compile
|
`RUN go mod download`) before `COPY . .`; the steps that compile
|
||||||
(`golangci-lint run`, `go test`, `go build`) mount Go's build cache
|
(`golangci-lint run`, `go test`, `go build`) mount Go's build cache
|
||||||
|
|||||||
@@ -243,9 +243,10 @@ style conventions are in separate documents:
|
|||||||
|
|
||||||
The development environment stage installs development prerequisites by
|
The development environment stage installs development prerequisites by
|
||||||
running `script/bootstrap`. Only system packages may be installed inline
|
running `script/bootstrap`. Only system packages may be installed inline
|
||||||
above it, so that check builds keep them; the `prompts` repo's own
|
above it, so that a change to `script/` does not install them again; the
|
||||||
`Dockerfile` does this. A stage that runs `script/bootstrap` COPYs `script/`
|
`prompts` repo's own `Dockerfile` does this. A stage that runs
|
||||||
and the dependency manifests it needs before running it. These are examples:
|
`script/bootstrap` COPYs `script/` and the dependency manifests it needs
|
||||||
|
before running it. These are examples:
|
||||||
- `package.json`, `yarn.lock`, `.yarnrc.yml` and `.yarn/releases/`
|
- `package.json`, `yarn.lock`, `.yarnrc.yml` and `.yarn/releases/`
|
||||||
- `go.mod` and `go.sum`
|
- `go.mod` and `go.sum`
|
||||||
|
|
||||||
@@ -304,15 +305,8 @@ style conventions are in separate documents:
|
|||||||
- its own line or a line above it
|
- its own line or a line above it
|
||||||
- the files copied before it
|
- the files copied before it
|
||||||
|
|
||||||
Nothing needs to run again on an unchanged tree. Never prune the build cache
|
Never prune the build cache (`docker builder prune` and the like): it is
|
||||||
(`docker builder prune` and the like): it is shared with every other build
|
shared with every other build on the host.
|
||||||
on the host. When a check is added or changed, prove it works:
|
|
||||||
- plant a defect it must catch
|
|
||||||
- watch the run fail on it
|
|
||||||
- revert the defect
|
|
||||||
|
|
||||||
A green run alone shows neither that the check ran nor that it covers what
|
|
||||||
it should.
|
|
||||||
|
|
||||||
- **The gate phases are separate stages, and the build stage depends on both.**
|
- **The gate phases are separate stages, and the build stage depends on both.**
|
||||||
The lint phase is based on the `golangci/golangci-lint` image (pinned by
|
The lint phase is based on the `golangci/golangci-lint` image (pinned by
|
||||||
@@ -497,7 +491,7 @@ style conventions are in separate documents:
|
|||||||
already do.
|
already do.
|
||||||
|
|
||||||
- **A Python `test` phase that installs its packages from `Pipfile.lock` does it
|
- **A Python `test` phase that installs its packages from `Pipfile.lock` does it
|
||||||
before `COPY . .`, so check builds keep them.** The steps are:
|
before `COPY . .`, so a change to the code keeps them.** The steps are:
|
||||||
- `COPY script/ script/`
|
- `COPY script/ script/`
|
||||||
- `COPY Pipfile Pipfile.lock ./`
|
- `COPY Pipfile Pipfile.lock ./`
|
||||||
- `RUN script/bootstrap`
|
- `RUN script/bootstrap`
|
||||||
|
|||||||
Reference in new issue
Block a user