Dependency updates are automated
build/dependency-updates-configured@v1
The repository configures a tool that opens the dependency update, so upgrades arrive as reviewable pull requests rather than as a task nobody has time for.
| Id | build/dependency-updates-configured |
| Version | v1 |
| Category | build |
| Default severity | warning |
| Interpreter | python3 |
| Timeout | 30 seconds |
| Violations tolerated | 0 |
| Collects | files |
Collectors
This guardrail gathers nothing itself. It depends on the collectors below, which the CLI runs once per build before any check, and reads what they found out of GUARDRAIL_FACTS. A collector that collects nothing skips this guardrail rather than failing it.
| Collector | Gathers | Inputs it is given |
|---|---|---|
files | Presence, size and line counts of the well known files a repository is expected to carry, plus any extra path the guardrail asks for. | paths |
The inputs above are this guardrail's own, passed straight through. Configuring one in buildnote.json changes what is collected, and two guardrails configured the same way share the one collection.
Configuration
{
"guardrails": {
"failOn": "error",
"comment": true,
"checks": [
{
"use": "build/dependency-updates-configured@v1",
"severity": "warning",
"with": {
"paths": ".github/dependabot.yml,.github/dependabot.yaml,renovate.json,renovate.json5,.renovaterc,.renovaterc.json,.github/renovate.json"
},
"exemptions": []
}
]
}
}Inputs
| Input | Description | Default | Environment variable |
|---|---|---|---|
paths | Comma separated paths, any one of which satisfies the guardrail. | .github/dependabot.yml,.github/dependabot.yaml,renovate.json,renovate.json5,.renovaterc,.renovaterc.json,.github/renovate.json | GUARDRAIL_INPUT_PATHS |
How to fix
Configure Dependabot with .github/dependabot.yml:
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weeklyRenovate, configured with renovate.json, is the same answer. Either way the upgrade arrives as a pull request the tests run against, which is the only form in which it competes for attention with the rest of the work. An unautomated dependency is upgraded when a vulnerability forces it, which is the worst moment to be moving several major versions at once.
More in build
build/gradle-version-floor. The Gradle version the wrapper pins is at or above the floor the team sets, so the build runs on a toolchain that is still supported.build/runs-on-hosted-ci. The artifact was built by a CI platform rather than on somebody's workstation, so the build is attributable and repeatable.build/wrapper-distribution-verified. The Gradle wrapper pins the checksum of the distribution it downloads, so the toolchain cannot be swapped underneath the build.