Move civicrm extension extraction to Gitlab Pipeline
I find the current Jenkins job to update extensions on Transifex inefficient to do on a daily basis:
- it fetches all extensions in the directory (filters by those available in-app)
- looks for new releases
- extracts and updates Transifex
Eventually it does other things, like fetch Transifex translations, commit to repo, build the mo files. Those things make sense on a daily basis.
Sometimes we want to re-run the extraction on a single extension. For example, recently we had an issue with the gdpr extension, because the maintainers are mixing vX.Y
and X.Y
tags.
I did a test to move the "update transifex" process to a Gitlab Pipeline. Personally, I like that Gitlab uses Docker to manage the environment, so it's more clear/self-documented how the job is setup.
The proof of concept can be seen here:
https://lab.civicrm.org/dev/translation/-/blob/master/.gitlab-ci.yml
Note: the config is split in two tasks, so that for testing we can more easily run only one or the other (extract / commit). We can merge them once it's well-tested.
What's missing:
-
Configure the Transifex token in the Gitlab CI/CD settings of the project -
Configure a Github token so that the pipeline can commit (personal token added to my mlutfy-civicrm
account) -
Setup a Gitlab webhook so that we can trigger the pipeline for new releases -
Call the webhook when new releases are published on civicrm.org (extdir module, modules/custom/extdir/extdir.drush.inc
)