Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: udpate configuration for renovate #690

Merged
merged 2 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# macOs only https://github.com/sorah/envchain
# https://github.com/settings/tokens
# envchain --set --noecho github RENOVATE_TOKEN
# envchain --set --noecho github DOCKER_HUB_USERNAME
# https://hub.docker.com/settings/security?generateToken=true
# envchain --set github DOCKER_HUB_USERNAME
# envchain --set --noecho github DOCKER_HUB_TOKEN
export RENOVATE_TOKEN=$(envchain github env | grep RENOVATE_TOKEN | cut -d'=' -f2)
export RENOVATE_DOCKER_HUB_USERNAME=$(envchain github env | grep DOCKER_HUB_USERNAME | cut -d'=' -f2)
Expand Down
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ exclude-labels:
- invalid
- '[skip-changelog]'
- '[skip-ci]'
- 'plugin'
- 'skip-ci'
- 'skip-release'
# group them
- 'github-action'
- 'pre-commit'

autolabeler:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SHELL := /bin/bash
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules

CI_RENOVATE_IMAGE := renovate/renovate:37.125.2-slim
CI_RENOVATE_IMAGE := renovate/renovate:37.267.0-slim
RENOVATE_REPOSITORIES := $(shell cat ./renovate/repositories.json | jq -r '. | join(",")')
RENOVATE_DRY_RUN := false
LOG_LEVEL := debug
Expand All @@ -20,7 +20,7 @@ hooks: ## Setup pre commit.
validate: ## Validate files with pre-commit hooks
@pre-commit run --all-files

deps: ## Run renovate locally
run: ## Run renovate locally
docker run --rm -it \
-w /tmp \
-v ${PWD}/renovate/config.js:/ren/renovate-config.js \
Expand Down
41 changes: 28 additions & 13 deletions renovate/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ module.exports = {
"pre-commit": {
"enabled": true
},
"labels": ["renovate", "deps", "{{depType}}", "datasource::{{datasource}}", "type::{{updateType}}", "manager:{{manager}}"]
"labels": ["renovate", "deps", "{{depType}}", "datasource::{{datasource}}", "type::{{updateType}}", "manager:{{manager}}"],
"ignorePaths": [
"examples/**",
"k8s/sandbox/**",
"**/tests/**",
],
"vulnerabilityAlerts": {
"enabled": true,
"addLabels": ["vulnerability"]
Expand Down Expand Up @@ -78,21 +83,17 @@ module.exports = {
"separateMultipleMajor": true,
"groupName": "{{datasource}}",
"addLabels": ["rule::4"],
"addLabels": ["{{datasource}}", "{{updateType}}"]
"addLabels": ["rule::4", "{{datasource}}", "{{updateType}}"]
},
{
"matchPackageNames": ["actions/*"],
"automerge": false,
"matchManagers": ["github-actions"],
"additionalBranchPrefix": "{{packageFileDir}}-",
"separateMajorMinor": true,
"separateMinorPatch": true,
"separateMultipleMajor": true,
"groupName": "{{datasource}} {{depType}} {{packageFile}}",
"addLabels": ["rule::4", "github-action"]
},
{
"matchManagers": ["github-actions"],
"addLabels": ["rule::4.1", "github-action"]
"addLabels": ["rule::4.2", "github-action", "skip-release"]
},
{
"automerge": false,
Expand Down Expand Up @@ -128,9 +129,11 @@ module.exports = {
"addLabels": ["rule::8"]
},
{
"automerge": true,
"groupName": "pre-commit",
"matchManagers": ["pre-commit"],
"addLabels": ["rule::10", "pre-commit"]
"commitMessageSuffix": "[skip ci]",
"addLabels": ["rule::10", "pre-commit", "skip-release", "skip-ci"]
},
// legacy
{
Expand Down Expand Up @@ -247,14 +250,14 @@ module.exports = {
},
{
"customType": "regex",
fileMatch: [
"fileMatch": [
"^Dockerfile$",
"Dockerfile$",
],
matchStrings: [
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\s(ARG|ENV) .*?_VERSION(=|\\s)(?<currentValue>.*)\\s"
],
versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"customType": "regex",
Expand Down Expand Up @@ -299,6 +302,18 @@ module.exports = {
],
"datasourceTemplate": "docker",
"versioningTemplate": "docker"
}
},
{
"customType": "regex",
"description": "Update .tflint.hcl dependencies",
"fileMatch": [
".tflint.hcl"
],
"matchStrings": [
"plugin \"aws\" {\\n\\s*enabled\\s*=\\s*true\\n\\s*version\\s=\\s*\"(?<currentValue>[a-z.]+)\"\\n\\s * source\\s*=\\s*\"github.com\\/(?<depName>.*?)\"\\n}"
],
"datasourceTemplate": "github-tags",
"versioningTemplate": "semver"
},
]
};
Loading