Skip to content

Commit adaa737

Browse files
committed
sync forgejo renovate connection
Signed-off-by: clux <sszynrae@gmail.com>
1 parent bfddfa6 commit adaa737

File tree

5 files changed

+91
-4
lines changed

5 files changed

+91
-4
lines changed

charts/renovate/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: renovate
33
description: wrapper over renovate
44
type: application
5-
version: 0.1.1
5+
version: 0.1.2
66
dependencies:
77
- name: renovate
88
version: "*"

charts/renovate/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,24 @@
33
A small `renovate` setup for a daily upgrade job against a select set of repositories.
44

55
Runs image from [clux/renovate](https://github.com/clux/renovate).
6+
7+
## Usage
8+
9+
Configure for a [github org](./kube.yaml), [personal github acc](./clux.yaml), [forgejo instance](./forgejo.yaml).
10+
11+
## Integration
12+
13+
### Github
14+
15+
For automerges of PRs:
16+
17+
- add an [automerge workflow](https://github.com/clux/renovate/blob/main/.github/workflows/automerge.yml)
18+
- repo settings: enable auto-merge
19+
- repo settings / branches: add branch protection to `main` and require ci statuses to pass
20+
- repo settings / actions / runners: allow gh actions to create and approve prs
21+
- add account (whose pat you are running) to the org (in org case) or repo (in user case)
22+
- approve PAT if necessary (org)
23+
24+
### Forgejo
25+
26+
See [forgejo.yaml](./forgejo.yaml).

charts/renovate/forgejo.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
# Cronjob instance for forgejo
3+
renovate:
4+
repositories: []
5+
fullnameOverride: 'renovate-forgejo'
6+
envFrom:
7+
# Token generated at https://forgejo.clux.dev/user/settings/applications
8+
# Documented in https://forgejo.org/docs/next/user/token-scope/
9+
# Satisfying requirements in https://docs.renovatebot.com/modules/platform/gitea/
10+
# read:{user,organization,misc,email} + rw:{repo,issue}
11+
- secretRef:
12+
name: renovate-forgejo-clux
13+
14+
extraVolumes:
15+
- name: extra-cert
16+
configMap:
17+
name: clux-root-cert
18+
19+
extraVolumeMounts:
20+
- name: extra-cert
21+
mountPath: /etc/ssl/certs/clux.dev.root.ca.pem
22+
subPath: clux.dev.root.ca.pem
23+
env:
24+
NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/clux.dev.root.ca.pem"
25+
RENOVATE_GIT_URL: 'ssh'
26+
RENOVATE_ENDPOINT: "https://forgejo.clux.dev/api/v1"
27+
RENOVATE_AUTODISCOVER: false
28+
29+
# TODO: GITHUB_TOKEN for release note fetching (may be throttled)
30+
ssh_config:
31+
# SSH for forgejo follows the gitlab setup with evars above
32+
# https://docs.renovatebot.com/examples/self-hosting/#kubernetes-for-gitlab-using-git-over-ssh
33+
# A key containing an ssh config for host forgejo:
34+
# ---
35+
# Host forgejo
36+
# HostName forgejo.clux.dev
37+
# Port 32222
38+
# User git
39+
# StrictHostKeyChecking no
40+
# IdentityFile ~/.ssh/id_rsa
41+
# ...
42+
# along with any ssh key added to the associated username below
43+
existingSecret: 'renovate-ssh-full'
44+
45+
# different config for different platform
46+
renovate:
47+
config: |
48+
{
49+
"platform": "gitea",
50+
"autodiscover": false,
51+
"extends": [
52+
":semanticCommitsDisabled"
53+
],
54+
"username": "clux",
55+
"gitAuthor": "sszynrae <noreply@clux.dev>",
56+
"automerge": true,
57+
"automergeStrategy": "squash",
58+
"allowedPostUpgradeCommands": ["just"],
59+
"printConfig": true,
60+
"dependencyDashboard": false,
61+
"platformCommit": false,
62+
"repositories": {{ .Values.repositories }},
63+
"enabledManagers": ["helmv3", "custom.regex", "dockerfile", "cargo"],
64+
"packageRules": [{"matchManagers": ["helmv3"], "rangeStrategy": "pin"}],
65+
"customManagers": []
66+
}

charts/renovate/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ renovate:
4747
"prFooter": "PR generated by [Renovate Bot](https://github.com/renovatebot/renovate) running in @clux's [homelab](https://github.com/clux/homelab).",
4848
"printConfig": true,
4949
"dependencyDashboard": false,
50-
"platformCommit": "disabled",
50+
"platformCommit": false,
5151
"repositories": {{ .Values.repositories }},
5252
"enabledManagers": ["helmv3", "custom.regex", "dockerfile"],
5353
"packageRules": [{"matchManagers": ["helmv3"], "rangeStrategy": "pin"}],
@@ -80,7 +80,7 @@ renovate:
8080
envFrom: []
8181
env:
8282
LOG_LEVEL: debug
83-
OTEL_EXPORTER_OTLP_ENDPOINT: http://promstack-tempo.monitoring.svc:4318
83+
#OTEL_EXPORTER_OTLP_ENDPOINT: http://promstack-tempo.monitoring.svc:4318
8484
envList: []
8585

8686
redis:

dashboards/flux.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
{
300300
"targetBlank": true,
301301
"title": "",
302-
"url": "https://github.com/Thhethssmuz/${__data.fields.Name}"
302+
"url": "https://github.com/clux/${__data.fields.Name}"
303303
}
304304
]
305305
}

0 commit comments

Comments
 (0)