-
Notifications
You must be signed in to change notification settings - Fork 891
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
feat: Added Renovate to auto update helm-values and github-actions #979
Merged
Merged
Changes from 6 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0741d38
enhancement: Moved image properties
kvanzuijlen 3a1c0bf
fix(tests): Fixed tests and use snapshots
kvanzuijlen bdb8786
fix(tests): Some refactoring
kvanzuijlen e517518
feat: Added renovate
kvanzuijlen 390836a
chore: cleanup
kvanzuijlen 945cafb
Merge branch 'main' into renovate-autoupdate
kvanzuijlen 78cd773
Merge branch 'main' into renovate-autoupdate
kvanzuijlen 94553c4
Merge remote-tracking branch 'origin/renovate-autoupdate' into renova…
kvanzuijlen bf306d6
Merge branch 'main' into renovate-autoupdate
kvanzuijlen 42898ff
chore: Updated renovate config and action
kvanzuijlen 2efe39e
fix: Fixed mount volumes
kvanzuijlen b14ce8b
docs: Added breaking changes documentation
kvanzuijlen 71c219a
fix: Updated test snapshots
kvanzuijlen 1833cba
chore: Also update jenkins version via Renovate
kvanzuijlen 12d7783
chore: Temporarily enable dependency dashboard
kvanzuijlen dba6f97
chore: Fixed md indentation
kvanzuijlen 66626c5
chore: Made unittests more robust
kvanzuijlen 980e329
chore: Bump Chart version
kvanzuijlen ed53918
fix: remove erroneous condition
kvanzuijlen fb9052c
Merge branch 'main' into renovate-autoupdate
kvanzuijlen fc6d514
feat: Added Renovate configuration
kvanzuijlen 9780bbc
chore: Renamed admin credential values
kvanzuijlen 05e5586
chore: Updated changelog
kvanzuijlen d0b3aad
chore: Fixed linting issues
kvanzuijlen 6e26829
chore: Removed backup from Helm Chart
kvanzuijlen 49e3943
chore: Added to UPGRADING.md and updated deprecation.yaml
kvanzuijlen cc69d9b
chore: Fixed linting issues
kvanzuijlen dcb318c
chore: Fixed deprecation.yaml
kvanzuijlen fc65c38
chore: Fixed linting issues
kvanzuijlen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
$schema: "https://docs.renovatebot.com/renovate-schema.json", | ||
semanticCommits: "auto", | ||
enabledManagers: [ | ||
"helm-values", | ||
"github-actions", | ||
"regex" | ||
], | ||
packageRules: [ | ||
{ | ||
matchDepNames: ["jenkins/inbound-agent"], | ||
versioning: "loose" | ||
}, | ||
{ | ||
matchManagers: [ | ||
"github-actions", | ||
"regex" | ||
], | ||
schedule: ["every monday"] | ||
}, | ||
{ | ||
matchManagers: ["helm-values"], | ||
bumpVersion: "minor", | ||
postUpgradeTasks: { | ||
"commands": ["helm unittest --strict -f 'unittests/*.yaml' charts/jenkins -u"], | ||
"fileFilters": ["charts/jenkins/**"], | ||
"executionMode": "update" | ||
} | ||
} | ||
], | ||
customManagers: [ | ||
{ | ||
customType: "regex", | ||
fileMatch: [ | ||
"(^|/)\\.github/workflows/[^/]+\\.ya?ml$" | ||
], | ||
matchStrings: [ | ||
"# renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)( extractVersion=(?<extractVersion>.*?))?( versioning=(?<versioning>.*?))?\\s+?[\\w\\s-]*?version: (?<currentValue>.*)\\s" | ||
] | ||
} | ||
], | ||
allowedPostUpgradeCommands: [ | ||
"helm unittest --strict -f 'unittests/*.yaml' charts/jenkins -u", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Renovate | ||
on: | ||
schedule: | ||
- cron: "0 * * * 3" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
renovate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get token | ||
id: get_token | ||
uses: tibdex/github-app-token@v2 | ||
with: | ||
app_id: ${{ secrets.JENKINS_DEPENDENCY_UPDATER_APP_ID }} | ||
private_key: ${{ secrets.JENKINS_DEPENDENCY_UPDATER_PRIVATE_KEY }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Self-hosted Renovate | ||
uses: renovatebot/[email protected] | ||
with: | ||
token: "${{ steps.get_token.outputs.token }}" | ||
timja marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed? won't CI just run this anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
-u
updates the snapshots, which is needed for kiwigrid/k8s-sidecar and jenkins/inbound-agentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that's cool, much simpler.
We could also configure this to update plugins too right then?
helm-charts/charts/jenkins/values.yaml
Lines 250 to 253 in 762105a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, that could be a bit harder... We'd need to use the regex manager for that, so we can't use the bumpVersion functionality. I see 2 solutions for that;
postUpgradeTasks
for bumping the Chart version as wellI need to verify if the postUpgradeTasks approach would work, as I don't know if things like helm (and helm unittest) are available once installed on the runner or if we'd need to build a custom Renovate image (Renovate runs in a container, but could, for example, mount some stuff).
If a custom image is required we could opt for option 2 instead. If a custom image isn't a big deal (it should be quite easy, with Renovate auto-updating it, etc.) that would also be an option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could maintain a
plugins.txt
file and sync it in the renovate workflow usingyq
to override what's in the values.yaml file in post upgrade tasks?https://docs.renovatebot.com/modules/manager/jenkins/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be an option yeah. That still wouldn't solve the bumpVersion issue though. Also, postUpgradeTasks run within the image, so we'd have to install the tools on the runner and mount the executables/binaries, use a custom image, or use the 2-step solution I proposed.
Personally, I'm more of a fan of mounting the tools since it doesn't involve custom images (maintenance!) and it doesn't require a 2-step approach.