Enable Renovate to Receive PRs for Upgrading Your Modules

Renovate is a tool used for automating dependency updates in software projects. It helps maintain and manage dependencies by automatically creating pull requests (PRs) to update libraries and modules to their latest versions. This ensures that your project stays up-to-date with the latest features, improvements, and security patches without manual intervention.

go to https://developer.mend.io/ and login with your github account

login to renovate

select install more

select all or specify which repositories to watch

go to the settings and disable the dependencies updates

a PR should appears in the github repository , you can see the status of renovate in the mend website

to configure renovate you must drop a renovate.json in a specific branch renovate/configure

go to the command line

git fetch
git pull origin main 
git checkout renovate/configure

then add/overwrite the content to renovate.json

this is an example for pihole

this is a roundcubemail example with static version to be sure to stick on a version of mariadb

this is a more general version, netdata will upgrade quite everything in the repo

these are generic example, you must check the log of renovate to catch what is wrong, sometimes the version inside the build-images is not standard


the PR itself could bring you some lights

4 Likes

Salut @stephdl

This looks more geared to Devs, or those making their own modules.
For general NS8 users updates of modules should appear on the NS8 dashboard.

Is my assumption correct?

But Renovate looks good. :slight_smile:

TIA

Andy

Yep I think it’s a good advice for @app_authors

1 Like

correct, it is for developers

1 Like

@stephdl

Always good, when budding Devs like Oneonitram get’s tips - coding and good tools - from a seasoned dev like you, @stephdl !!!
Even non-devs like me can use an additional good tool in their “Toolbox”.

Mes deux centimes
Andy

2 Likes

@stephdl Will it also upgrade mode modules for the ui

if you enable the dependencies upgrade in the settings, but this must be a manual action, else you could have some bad surprises

I would recommend from time to time to do an upgrade of ns8-ui-lib or when you are coding something new in the UI, obviously you have to test the UI after it, you might have something broken even if I never saw it

cd ui
yarn add @nethserver/ns8-ui-lib
2 Likes

We have migrated to a more centralized configuration

{
“$schema”: “``https://docs.renovatebot.com/renovate-schema.json”``,
“extends”: [
“local>NethServer/.github:ns8”
]
}

if you trust renovate you can enable automerge

{
“$schema”: “``https://docs.renovatebot.com/renovate-schema.json”``,
“extends”: [
“local>NethServer/.github:ns8-automerge”
]
}

see GitHub - NethServer/.github

1 Like

We noticed renovate doesnt work well with this formart
app_version=“15.89.2”
Appname:${app_version}

any workarounds or pointers…

renovate works like a regex and with the way you show, for sure it will not works well

this the example of ns8-wordpress/build-images.sh at 18778125cdc48c0f2f7dbd617bd86b77b03013a7 · NethServer/ns8-wordpress · GitHub

renovate can understand what we expect when it reads

--label="``org.nethserver.images=docker.io/mariadb:10.11.15`` ${repobase}/wordpress-app:${IMAGETAG:-latest}" \

it will try to read from : docker.io/mariadb:10.11.15 then it looks to dockerhub to check if a new version of container is available

with
app_version=“15.89.2”
Appname:${app_version}

we have not clue to give to renovate

in the example youve given, with wordpress for example, you’re not affixing any specific version

–label=“org.nethserver.images=docker.io/mariadb:10.11.15 ${repobase}/wordpress-app:${IMAGETAG:-latest}”

You refer to this

docker.io/mariadb:10.11.15 this will work because renovate can understand it looks after docker.io/mariadb and something as a semantic docker version

${repobase}/wordpress-app:${IMAGETAG:-latest}: this will not work because it does not know where to search. IT sometimes is dumb

1 Like

@kemboielvis22 following the ns8 configuration you will see updates to the UI, for some of them you could need to upgrade first ns8-ui-lib to 1.8.0 first then rebase the branch to it

Yeah, We have a huge Backlog on some of the UI library, and node packages… Should try to workout a modality to Update All for All Apps, before things begin to break in the near future…

basically for the UI, if the build of the module succeed you can be sure it works, but at least some basic testing of the UI should be done before to tag it as stable

For other upgrades, like database or container upgrade, you are on your own, either you could do a robot infrastructure like Nethesis has done, or test the upgrade manually

I understand you, my modules that are not in the NethServer repository does not have access to the robot Infra and manually I test the basic feature, can I login, can I configure etc

1 Like

We Would Love to Implement some Automated Testing of Modules, After they are built, Auto Deploy to Server, Auto Configure, based on config scripts, test Uninstall, If we can Automate Most of these, A huge Amount of Testing issues and Challenges would be Sorted. We could then auto test Upgrades, and Backup.. not sure if there is script to automate backup and restore via cli though, but those ar ethe targets for Next year.

The last Bit of Automation would be on Module updates, after images Updates…

Then we would have COvered entire pipeline of NS modules, there is a Module creation script, that keeps improving, Human in the loop will be minimal on modules testing…

1 Like