Skip to content

Commit 57a81a0

Browse files
committed
ci: adopt self-hosted Renovate, delete dependabot.yml (Phase 6)
Phase 6 of the scenario-regression smoke-pack tech-spec. Adopts self-hosted Renovate via renovatebot/github-action and retires Dependabot per ADR-2. What ships: - renovate.json with: - osvVulnerabilityAlerts: true (CVE-aware updates) - dependencyDashboard: true (the dashboard issue is Renovate's state record between runs; without it Renovate re-resolves every dep every invocation and may double-open PRs) - 6 group rules from the spec's pinning-strategy table: * scenario-{packageName} for own GHCR images (per-image immediate) * upstream-{packageName} for tika / paperless-ngx / gotenberg (weekly) * npm-dev, npm-prod (weekly, separate) * composer (weekly) * github-actions (weekly + pinDigests=true) * security-priority (ungrouped, immediate, via vulnerabilityAlerts) - customManagers regex matching the GHCR / docker.io pins introduced in Phase 5: (ghcr.io|docker.io)/repo:tag@sha256:digest. Renovate's built-in docker manager doesn't cover ecs.ContainerImage.fromRegistry() string literals; this custom manager does. - .github/workflows/renovate.yml: - twice daily (06:00, 18:00 UTC) + workflow_dispatch - renovatebot/github-action pinned by digest (v46.1.14 -> 693b9ef15eec82123529a37c782242f091365961). Renovate's own github-actions packageRule keeps this current via pinDigests. - Uses RENOVATE_TOKEN (fine-grained PAT, repo:read+write on this repo only). Minted by operator per the runbook's Operational Notes. - .github/dependabot.yml deleted. The 7 ecosystem groups from dependabot map onto the 6 Renovate groups (composer + drupal-core / contrib / localgov merged into single composer group; npm split into dev+prod by depType; pip routed to its own group; docker absorbed into custom managers + upstream group; github-actions ported verbatim). Operator follow-ups (NOT in this PR): - T6.3 mint RENOVATE_TOKEN and add as repo secret - T6.5 close in-flight Dependabot PRs (preferred: merge the safe ones first) - T6.6 verify Renovate fires post-merge - workflow_dispatch then check PR list DoD per spec: "first Renovate PR has fired AND smoke has gated it" - the smoke-gating part requires Phase 1b to be complete so the smoke workflow runs. Until then, Renovate PRs open but the smoke check is a no-op (the smoke workflow self-disables on placeholder config).
1 parent 2454e8b commit 57a81a0

3 files changed

Lines changed: 176 additions & 82 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 82 deletions
This file was deleted.

.github/workflows/renovate.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Renovate
2+
3+
# Self-hosted Renovate via renovatebot/github-action. Phase 6 of the
4+
# scenario-regression smoke-pack tech-spec. Replaces .github/dependabot.yml
5+
# (deleted in this PR per ADR-2) with the unified bot.
6+
#
7+
# Cadence: twice daily. The cold-start cost is non-trivial (~2-3 min full
8+
# scan + per-package resolution) so 4×/day would burn CI minutes without
9+
# proportional value. workflow_dispatch lets a maintainer trigger ad-hoc.
10+
#
11+
# Action pin: digest, not tag. The spec's pinning strategy is "every pin
12+
# must carry a Renovate-trackable tag alongside the digest." The digest
13+
# below tracks v46.1.14 of renovatebot/github-action. Renovate's
14+
# github-actions packageRule (in renovate.json) pinDigests=true keeps
15+
# this current.
16+
17+
on:
18+
schedule:
19+
- cron: '0 6,18 * * *' # 06:00 and 18:00 UTC daily
20+
workflow_dispatch:
21+
inputs:
22+
logLevel:
23+
description: 'Log level (debug for verbose)'
24+
required: false
25+
default: 'info'
26+
type: choice
27+
options:
28+
- info
29+
- debug
30+
31+
permissions:
32+
contents: read
33+
# Renovate writes via the PAT (RENOVATE_TOKEN), NOT GITHUB_TOKEN. Keeping
34+
# GITHUB_TOKEN's permissions tight prevents accidental scope creep.
35+
36+
concurrency:
37+
group: renovate
38+
cancel-in-progress: false
39+
40+
jobs:
41+
renovate:
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 30
44+
steps:
45+
- uses: actions/checkout@v6
46+
47+
- name: Run Renovate
48+
uses: renovatebot/github-action@693b9ef15eec82123529a37c782242f091365961 # v46.1.14
49+
with:
50+
# Fine-grained PAT scoped repo:read+write on co-cddo/ndx_try_aws_scenarios only.
51+
# Minted by the operator per docs/smoke-test-account-setup.md →
52+
# Operational Notes → RENOVATE_TOKEN rotation.
53+
token: ${{ secrets.RENOVATE_TOKEN }}
54+
configurationFile: renovate.json
55+
env:
56+
LOG_LEVEL: ${{ inputs.logLevel || 'info' }}
57+
RENOVATE_PLATFORM: github
58+
RENOVATE_REPOSITORIES: '["co-cddo/ndx_try_aws_scenarios"]'
59+
# Keep Renovate's onboarding off; renovate.json is the committed config.
60+
RENOVATE_ONBOARDING: 'false'
61+
RENOVATE_REQUIRE_CONFIG: 'required'

renovate.json

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended",
5+
":dependencyDashboard",
6+
":semanticCommits"
7+
],
8+
"timezone": "Europe/London",
9+
"platform": "github",
10+
"labels": ["renovate"],
11+
"osvVulnerabilityAlerts": true,
12+
"vulnerabilityAlerts": {
13+
"labels": ["security", "security-priority"],
14+
"minimumReleaseAge": null
15+
},
16+
"rangeStrategy": "bump",
17+
"configMigration": true,
18+
"ignorePaths": [
19+
"**/node_modules/**",
20+
"**/cdk.out/**",
21+
"**/.aws-sam/**",
22+
"**/dist/**",
23+
"**/.upstream/**"
24+
],
25+
"customManagers": [
26+
{
27+
"customType": "regex",
28+
"description": "Pin GHCR + docker.io image references in CDK TypeScript and raw CFN templates. Renovate's built-in docker manager does not cover ecs.ContainerImage.fromRegistry() string literals; this manager does.",
29+
"fileMatch": [
30+
"^cloudformation/scenarios/.*\\.(ts|yaml|yml|json)$"
31+
],
32+
"matchStrings": [
33+
"(?<depName>(?:ghcr\\.io|docker\\.io)/[a-z0-9._/-]+):(?<currentValue>[a-z0-9.\\-]+)@(?<currentDigest>sha256:[a-f0-9]+)"
34+
],
35+
"datasourceTemplate": "docker",
36+
"versioningTemplate": "docker"
37+
}
38+
],
39+
"packageRules": [
40+
{
41+
"description": "Pin discipline: NEVER replace a digest with a bare tag; updates must carry both.",
42+
"matchCustomManagers": ["custom.regex"],
43+
"pinDigests": true
44+
},
45+
{
46+
"description": "Own GHCR images — one PR per scenario; immediate when an image bumps. Smoke runs scoped to that scenario give fast feedback.",
47+
"groupName": "scenario-{{packageName}}",
48+
"matchCustomManagers": ["custom.regex"],
49+
"matchPackagePatterns": [
50+
"^ghcr\\.io/co-cddo/ndx_try_aws_scenarios-"
51+
],
52+
"schedule": ["at any time"]
53+
},
54+
{
55+
"description": "Upstream container deps (tika, paperless-ngx, gotenberg). Weekly grouped per image to keep blast radius small.",
56+
"groupName": "upstream-{{packageName}}",
57+
"matchCustomManagers": ["custom.regex"],
58+
"matchPackagePatterns": [
59+
"^docker\\.io/apache/tika",
60+
"^docker\\.io/gotenberg/gotenberg",
61+
"^ghcr\\.io/paperless-ngx/paperless-ngx"
62+
],
63+
"schedule": ["before 09:00 on monday"]
64+
},
65+
{
66+
"description": "npm dev deps — weekly batched. Low-risk; noise control.",
67+
"matchManagers": ["npm"],
68+
"matchDepTypes": ["devDependencies"],
69+
"groupName": "npm-dev",
70+
"schedule": ["before 09:00 on monday"]
71+
},
72+
{
73+
"description": "npm prod deps — weekly batched. Higher risk; smoke gates the merge.",
74+
"matchManagers": ["npm"],
75+
"matchDepTypes": ["dependencies"],
76+
"groupName": "npm-prod",
77+
"schedule": ["before 09:00 on monday"]
78+
},
79+
{
80+
"description": "Drupal composer deps. Same cadence as npm-prod.",
81+
"matchManagers": ["composer"],
82+
"groupName": "composer",
83+
"schedule": ["before 09:00 on monday"]
84+
},
85+
{
86+
"description": "GitHub Actions — workflow action references. Weekly batched; action bumps rarely break.",
87+
"matchManagers": ["github-actions"],
88+
"groupName": "github-actions",
89+
"schedule": ["before 09:00 on monday"]
90+
},
91+
{
92+
"description": "Pin tag-only docker references in workflow files to digest. Required by the spec's pinning strategy ('every pin must carry a Renovate-trackable tag alongside the digest', conversely actions referenced without digest are not Renovate-trackable).",
93+
"matchManagers": ["github-actions"],
94+
"pinDigests": true
95+
},
96+
{
97+
"description": "CVE response — never batch. Highest priority; surfaces via osvVulnerabilityAlerts.",
98+
"matchPackagePatterns": [".*"],
99+
"matchUpdateTypes": ["patch", "minor"],
100+
"vulnerabilityAlerts": {
101+
"groupName": "security-priority",
102+
"schedule": ["at any time"]
103+
}
104+
},
105+
{
106+
"description": "Python pip Lambda layer deps — batched weekly with npm-dev cadence.",
107+
"matchManagers": ["pip_requirements", "pip-compile"],
108+
"groupName": "pip",
109+
"schedule": ["before 09:00 on monday"]
110+
}
111+
],
112+
"prConcurrentLimit": 10,
113+
"prHourlyLimit": 4,
114+
"branchConcurrentLimit": 20
115+
}

0 commit comments

Comments
 (0)