Skip to content

Commit

Permalink
[chore] Add a ci pipeline to test renovate's configuration on PR (#1182)
Browse files Browse the repository at this point in the history
#### Is this a new chart
No

#### What this PR does / why we need it:
I merged an invalid configuration for renovatebot on the PR #1155

This PR should add a test to not allow to merging an invalid
configuration and fix the configuration.

#### Which issue this PR fixes
  - fixes #1180

#### Special notes for your reviewer:
The first commit (or set of commits) tries to create a pipeline that
fails because the configuration is broken at the time of opening this
PR.

After having a failing pipeline, I'll add a commit that fixes the
config.

I advise the reviewer to go commit by commit. I'll try to squash them to
make the review easier :)

#### Checklist
- [ ] Chart Version bumped
- [ ] Variables are documented in the README.md
- [x] Title of the PR starts with chart name (e.g. `[mychartname]`)
  • Loading branch information
kang-makes authored Oct 25, 2023
1 parent 8e5fb4d commit eb2a023
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": [
"config:base",
"config:recommended",
// Disable the creation of this issue that renovate updates with the pending issue we follow with Zenhub:
// https://github.com/newrelic/helm-charts/issues/484
":disableDependencyDashboard"
Expand All @@ -14,7 +14,7 @@
"packageRules": [
{
// Group all nri-bundle dependencies together in a single PR.
"matchPaths": [
"matchFileNames": [
"charts/nri-bundle/**"
],
"groupName": "Bundle dependencies",
Expand All @@ -30,7 +30,7 @@
},
{
// Disable updates in nri-bundle-legacy chart.
"matchPaths": [
"matchFileNames": [
"charts/nri-bundle-legacy/**"
],
"enabled": false
Expand All @@ -40,15 +40,17 @@
"matchPackageNames": [
"newrelic-infrastructure"
],
"matchPaths": [
"matchFileNames": [
"charts/nri-bundle-legacy/**"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"enabled": true
},
}
],
"regexManagers": [
{
// Update Super Agent chart
"fileMatch": [ "^charts/super-agent-deployment/Chart.yaml$" ],
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/test-renovate-configuration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Test Renovate configuration

on: pull_request

jobs:
renovate-config-validator:
name: Renovate config validator
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Renovate config validator
run: npm install --global renovate

- name: Test that the config is valid
run: renovate-config-validator

0 comments on commit eb2a023

Please sign in to comment.