-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
p-j-smith
commented
Dec 22, 2023
- renovate all defaults plugin version using custom managers
.renovaterc.json
Outdated
{ | ||
"customType": "regex", | ||
"description": "Update XNAT dax plugin specfied in roles/xnat/defaults/main.yml", | ||
"fileMatch": ["roles/xnat/defaults/main.yml$"], | ||
"matchStrings": ["dax-plugin-genProcData-(?<currentValue>.*?).jar"], | ||
"depNameTemplate": "VUIIS/dax", | ||
"datasourceTemplate": "github-releases" | ||
}, |
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.
This won't work because we're downloading a specific file from a repo rather than targeting a release. Any ideas how to handle this?
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.
I think that needs a custom datasource - https://docs.renovatebot.com/modules/datasource/custom/
"matchStrings": ["dxm-settings-plugin-(?<currentValue>.*?).jar"], | ||
"depNameTemplate": "xnatx/xnatx-dxm-settings-plugin", | ||
"datasourceTemplate": "bitbucket-tags", | ||
"versioningTemplate": "regex:(?<major>\\d+).(?<minor>\\d+)" |
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 versionTemplate
needed? I added it as the current version is 1.0
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.
Probs better to leave it in just in case the default versioning doesn't pick it up.
Any ideas how to add these custom managers to a group so they all get updated together? There are docs on grouping packages but I don't know how to do this for the custom managers we have |
"VUIIS-dax": { | ||
"defaultRegistryUrlTemplate": "https://api.github.com/repos/VUIIS/dax/contents/misc/xnat-plugins", | ||
"transformTemplates": [ | ||
"{\"releases\": $.{\"version\": $join([\"v\", $match(name, /(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)/ ).match ])}}" |
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.
This transforms the HTTP response into the format required by renovate. I tried it on https://try.jsonata.org/ using the output from curl https://api.github.com/repos/VUIIS/dax/contents/misc/xnat-plugins
and the query:
{"releases": $.{"version": $join(["v", $match(name, /(\d+\.)?(\d+\.)?(\*|\d+)/ ).match ])}}
I would ask on https://github.com/renovatebot/renovate/discussions |
"matchPackageNames": [ | ||
"xnatdev/xnat-web", | ||
"xnatdev/xsync", | ||
"xnatx/ldap-auth-plugin", | ||
"xnatdev/container-service", | ||
"xnatx/xnatx-batch-launch-plugin", | ||
"VUIIS/dax", | ||
"icrimaginginformatics/ohif-viewer-xnat-plugin", | ||
"xnatx/ml-plugin", | ||
"xnatx/datasets-plugin", | ||
"xnatdev/xnat-image-viewer-plugin", | ||
"xnatx/xnatx-dxm-settings-plugin", | ||
"NrgXnat/xnat-pipeline-engine" | ||
], |
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.
I think this should work as the packageName
is taken from the depNameTemplate
specified in the custom managers
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.
Looks good
Make sure to check the console https://developer.mend.io/github/UCL-MIRSG/ansible-collection-xnat |