Skip to content

Commit af4a171

Browse files
Configure Renovate (#8298)
1 parent f3694bc commit af4a171

File tree

10 files changed

+231
-93
lines changed

10 files changed

+231
-93
lines changed

.github/dependabot.yml

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

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ documentation:
2929
- head-branch: ['^docs?/']
3030

3131
dependencies:
32-
- head-branch: ['^deps?/', '^dependabot/', '^renovate/', 'pre-commit-ci-update-config']
32+
- head-branch: ['^deps?/', '^dependabot/', '^renovate/', '^mend/', 'pre-commit-ci-update-config']
3333

3434
helm_chart:
3535
- head-branch: ['^helm/', '^chart/']

.github/scripts/copy-images.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ set -eo pipefail
66
export ROOTDIR=$(git rev-parse --show-toplevel || echo ".")
77

88
SKOPEO_BIN=skopeo
9+
910
if [ -n "$CI" ]; then
10-
SKOPEO_BIN="docker run --rm -v $HOME/.docker/config.json:/tmp/auth.json $(grep skopeo "${ROOTDIR}/tests/Dockerfile" | grep FROM | cut -d ' ' -f 2)"
11+
SKOPEO_IMAGE=quay.io/skopeo/stable
12+
# renovate: datasource=docker depName=quay.io/skopeo/stable
13+
SKOPEO_VERSION=v1.20.0-immutable
14+
SKOPEO_BIN="docker run --rm -v $HOME/.docker/config.json:/tmp/auth.json ${SKOPEO_IMAGE}:${SKOPEO_VERSION}"
1115
fi
1216

1317
## Setup inputs

.github/scripts/exclude_ci_files.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.github/actionlint.yaml
2-
.github/dependabot.yml
32
.github/labeler.yml
43
.github/PULL_REQUEST_TEMPLATE.md
54
.github/release.yml
@@ -26,8 +25,6 @@
2625
.github/workflows/cherry-pick.yml
2726
.github/workflows/codeql-analysis.yml
2827
.github/workflows/create-release-branch.yml
29-
.github/workflows/dependabot-auto-merge.yml
30-
.github/workflows/dependabot-hugo.yml
3128
.github/workflows/dependency-review.yml
3229
.github/workflows/dockerhub-description.yml
3330
.github/workflows/docs-build-push.yml

.github/workflows/dependabot-auto-merge.yml

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

.github/workflows/f5-cla.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
remote-repository-name: "f5-cla-data"
4444
path-to-signatures: "signatures/beta/signatures.json"
4545
# Comma separated list of usernames for maintainers or any other individuals who should not be prompted for a CLA.
46-
allowlist: bot*
46+
allowlist: bot*,renovate,mend
4747
# Do not lock PRs after a merge.
4848
lock-pullrequest-aftermerge: false
4949
env:

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ override DOCKER_BUILD_OPTIONS += --build-arg IC_VERSION=$(VERSION) --build-arg P
1717
ARCH ?= amd64 ## The architecture of the image or binary. For example: amd64, arm64, ppc64le, s390x. Not all architectures are supported for all targets
1818
GOOS ?= linux ## The OS of the binary. For example linux, darwin
1919
TELEMETRY_ENDPOINT ?= oss.edge.df.f5.com:443
20+
# renovate: datasource=docker depName=golangci/golangci-lint
21+
GOLANGCI_LINT_VERSION ?= v2.5.0 ## The version of golangci-lint to use
2022

2123
# Additional flags added here can be accessed in main.go.
2224
# e.g. `main.version` maps to `var version` in main.go
@@ -50,7 +52,7 @@ all: test lint verify-codegen update-crds debian-image
5052
.PHONY: lint
5153
lint: ## Run linter
5254
@git fetch
53-
docker run --pull always --rm -v $(shell pwd):/kubernetes-ingress -w /kubernetes-ingress -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest git diff -p origin/main > /tmp/diff.patch && golangci-lint --color always run -v --new-from-patch=/tmp/diff.patch
55+
docker run --pull always --rm -v $(shell pwd):/kubernetes-ingress -w /kubernetes-ingress -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:$(GOLANGCI_LINT_VERSION) git diff -p origin/main > /tmp/diff.patch && golangci-lint --color always run -v --new-from-patch=/tmp/diff.patch
5456

5557
.PHONY: lint-python
5658
lint-python: ## Run linter for python tests

renovate.json

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"packageRules": [
4+
{
5+
"enabled": false,
6+
"matchPackageNames": [
7+
"boto3"
8+
],
9+
"matchUpdateTypes": [
10+
"patch"
11+
]
12+
},
13+
{
14+
"addLabels": [
15+
"go"
16+
],
17+
"matchDatasources": [
18+
"go",
19+
"golang-version"
20+
]
21+
},
22+
{
23+
"addLabels": [
24+
"python"
25+
],
26+
"matchDatasources": [
27+
"pypi"
28+
]
29+
},
30+
{
31+
"addLabels": [
32+
"javascript"
33+
],
34+
"matchDatasources": [
35+
"npm"
36+
],
37+
"rangeStrategy": "bump"
38+
},
39+
{
40+
"addLabels": [
41+
"docker"
42+
],
43+
"matchDatasources": [
44+
"docker"
45+
]
46+
},
47+
{
48+
"addLabels": [
49+
"helm"
50+
],
51+
"matchDatasources": [
52+
"helm"
53+
]
54+
},
55+
{
56+
"addLabels": [
57+
"github_actions"
58+
],
59+
"matchManagers": [
60+
"github-actions"
61+
]
62+
},
63+
{
64+
"matchPackageNames": [
65+
"/private-registry\\.nginx\\.com/",
66+
"/registry\\.redhat\\.io/",
67+
"/nginxdemos\\/nginx-hello/"
68+
],
69+
"matchDatasources": [
70+
"docker",
71+
"kubernetes"
72+
],
73+
"enabled": false
74+
}
75+
],
76+
"kubernetes": {
77+
"managerFilePatterns": [
78+
"/bundle/manifests/.+\\.yaml$/",
79+
"/bundle/tests/scorecard/.+\\.yaml$/",
80+
"/config/.+\\.yaml$/",
81+
"/examples/.+\\.yaml$/",
82+
"/helm-charts/nginx-ingress/crds/.+\\.yaml$/",
83+
"/helm-charts/nginx-ingress/templates/.+\\.yaml$/"
84+
]
85+
},
86+
"customManagers": [
87+
{
88+
"customType": "regex",
89+
"description": "Update env variable version in Github Actions workflow",
90+
"managerFilePatterns": [
91+
"/.github/workflows/.+\\.ya?ml$/"
92+
],
93+
"matchStrings": [
94+
"\\s+.+?: (?<currentValue>.+?) # renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s"
95+
]
96+
},
97+
{
98+
"customType": "regex",
99+
"description": "Update Operator SDK version in bundle Dockerfile",
100+
"managerFilePatterns": [
101+
"/bundle\\.Dockerfile$/"
102+
],
103+
"matchStrings": [
104+
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\sLABEL operators.operatorframework.io.metrics.builder=operator-sdk-(?<currentValue>.+?)\\s"
105+
]
106+
},
107+
{
108+
"customType": "regex",
109+
"description": "Update _VERSION variables in shell scripts and Makefiles",
110+
"managerFilePatterns": [
111+
"/\\.sh$/",
112+
"/Makefile$/"
113+
],
114+
"matchStrings": [
115+
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)?(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s+\\w+?_VERSION\\s*\\??=\\s*(?<currentValue>.+?)\\s"
116+
]
117+
},
118+
{
119+
"customType": "regex",
120+
"description": "Update _VERSION variables in Dockerfiles",
121+
"managerFilePatterns": [
122+
"(^|/|\\.)Dockerfile$",
123+
"(^|/)Dockerfile\\.[^/]*$"
124+
],
125+
"matchStrings": [
126+
"# renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
127+
]
128+
},
129+
{
130+
"customType": "regex",
131+
"datasourceTemplate": "github-tags",
132+
"description": "Update Github Action references in the Markdown files",
133+
"managerFilePatterns": [
134+
"\\.md$"
135+
],
136+
"matchStrings": [
137+
"\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentValue>v\\d+\\.\\d+\\.\\d+)",
138+
"\\suses: (?<depName>[\\w-]+/[\\w-]+)(?<path>/.*)?@(?<currentDigest>[a-z0-9]{40}|[a-z0-9]{64}) # (?<currentValue>v\\d+\\.\\d+\\.\\d+)"
139+
],
140+
"versioningTemplate": "semver"
141+
},
142+
{
143+
"customType": "regex",
144+
"description": "Update `version:` and `_VERSION:` variables in github workflows",
145+
"managerFilePatterns": [
146+
"^\\.github\\/workflows\\/\\w+\\.ya?ml$"
147+
],
148+
"matchStrings": [
149+
"\\s+(?:[[:word:]]-)?version: (?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>.+?))?\\s",
150+
"\\s*[[:word:]]+?_VERSION=(?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?) depName=(?<depName>.+?)(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>.+?))?\\s"
151+
]
152+
},
153+
{
154+
"customType": "regex",
155+
"description": "Update `Version:` in go files",
156+
"managerFilePatterns": [
157+
"\\.go$"
158+
],
159+
"matchStrings": [
160+
"// renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: registryUrl=(?<registryUrl>.+?))?(?: (?:packageName|lookupName)=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s.+?Version :?= \"(?<currentValue>.+?)\"\\s"
161+
],
162+
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
163+
},
164+
{
165+
"customType": "regex",
166+
"description": "Update Packer and Packer Plugin versions in Packer files",
167+
"datasourceTemplate": "github-tags",
168+
"depNameTemplate": "{{#if depName}}{{#if (containsString depName \"hashicorp/\")}}{{{replace \"hashicorp/\" \"hashicorp/packer-plugin-\" depName}}}{{else}}{{{depName}}}{{/if}}{{else}}hashicorp/packer{{/if}}",
169+
"managerFilePatterns": [
170+
"\\.pkr\\.hcl"
171+
],
172+
"matchStrings": [
173+
"required_version[\\s]+=[\\s]+\"=?(?<currentValue>\\S*)\"",
174+
"source[\\s]+=[\\s]+\"github.com/(?<depName>\\S*)\"[\\s]+version[\\s]+=[\\s]+\"(?<currentValue>\\S*)\"",
175+
"version[\\s]+=[\\s]+\"(?<currentValue>\\S*)[\\s]+source[\\s]+=[\\s]+\"github.com/(?<depName>\\S*)\""
176+
]
177+
}
178+
],
179+
"timezone": "Europe/Dublin",
180+
"automerge": true,
181+
"automergeStrategy": "squash",
182+
"commitBodyTable": true,
183+
"configMigration": true,
184+
"customDatasources": {
185+
"nginx-plus": {
186+
"defaultRegistryUrlTemplate": "https://raw.githubusercontent.com/lucacome/renovate-datasource/main/nginx-plus/releases.json",
187+
"format": "json"
188+
}
189+
},
190+
"extends": [
191+
"schedule:daily",
192+
"config:recommended",
193+
"docker:enableMajor",
194+
"helpers:pinGitHubActionDigests",
195+
":gitSignOff",
196+
":maintainLockFilesMonthly",
197+
":disableRateLimiting",
198+
":semanticCommitsDisabled"
199+
],
200+
"ignorePaths": [
201+
"**/node_modules/**"
202+
],
203+
"ignorePresets": [
204+
":ignoreModulesAndTests"
205+
],
206+
"labels": [
207+
"dependencies"
208+
],
209+
"postUpdateOptions": [
210+
"gomodTidy",
211+
"gomodUpdateImportPaths",
212+
"yarnDedupeHighest",
213+
"npmDedupe"
214+
],
215+
"pre-commit": {
216+
"enabled": true
217+
},
218+
"rebaseWhen": "behind-base-branch"
219+
}

tests/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# syntax=docker/dockerfile:1.16
2-
# this is here so we can grab the latest version of kind and have dependabot keep it up to date
3-
FROM kindest/node:v1.34.0@sha256:7416a61b42b1662ca6ca89f02028ac133a309a2a30ba309614e8ec94d976dc5a
4-
5-
# this is here so we can grab the latest version of skopeo and have dependabot keep it up to date
6-
FROM quay.io/skopeo/stable:v1.20.0-immutable@sha256:519b95573a7490eb4740c8180d3dc33d86417222956e655719e74d3509586a33
7-
82
FROM python:3.13-bookworm@sha256:f64a1db27d5d0fdcb48a54c553e67b0ec920c8a1ef0b627e87b8d3d73dc003fb
93

104
RUN apt-get update \

tests/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ REGISTRY ?= docker.io ## The registry where the image is loca
1919
PREFIX ?= nginx/nginx-ingress ## The name of the image. For example, nginx/nginx-ingress
2020
TAG ?= edge ## The tag of the image. For example, edge
2121
K8S_CLUSTER_NAME ?= local ## The name used when creating/using a Kind Kubernetes cluster
22-
K8S_CLUSTER_VERSION ?= $(shell grep -m1 'FROM kindest/node' < ${DOCKERFILEPATH} | cut -d ':' -f 2 | sed -e 's/^v//' | cut -d '@' -f 1) ## The version used when creating a Kind Kubernetes cluster
22+
# renovate: datasource=docker depName=kindest/node
23+
K8S_CLUSTER_VERSION ?= v1.34.0
2324
K8S_TIMEOUT ?= 75s ## The timeout used when creating a Kind Kubernetes cluster
2425
AD_SECRET ?=
2526
PLUS_JWT ?=

0 commit comments

Comments
 (0)