feat: use renovate to perform copier template updates
Copier has an update mode that allows a project template to be updated after creation. Importantly, this mode is cognisant of changes to project and will attempt to apply changes in a "smart" way, avoiding conflicts. Details of the process copier uses can be found here: https://copier.readthedocs.io/en/latest/updating/.
Since we perform semantic-releases for our copier template project at https://gitlab.com/gitlab-com/gl-infra/common-template-copier, we can instruct renovate to check for updates to the copier template, and then automatically perform an upgrade using copier --force update
to perform the upgrade.
Getting Started
To allow copier to start tracking a project, we need to initially run copier copy https://gitlab.com/gitlab-com/gl-infra/common-template-copier.git .
and manually dealing with any conflicts. An example of this type of change can be found pmv!77 (merged) and !145 (merged).
As part of this process, the template will generate a .copier-version
file, which needs to be checked in.
Once this is source-controlled, Renovate will start automatically performing updates on projects. An example of the template being applied to a project can be found here: common-template-copier!19 (merged)