Perl component for building perl modules on Gitlab instances
[email protected] (Wouter Verhelst)
| Newsgroups | perl.module-authors |
|---|---|
| Organization | none |
| Message-ID | <[email protected]> |
Hi all, First: please accept my apologies if this isn't the right list (and be so kind as to redirect me to the correct one), I'm not (yet) all that familiar with all the lists on perl.org. I chose this one as it seems most appropriate, but I might be wrong. If you maintain a CPAN dist on gitlab (either gitlab.com directly or a self-hosted one), this might be for you. I wrote a gitlab "component" that will help you build a CI/CD pipeline for your perl code. It has the following features: - Autodetects whether your code is using ExtUtils::MakeMaker, Dist::Zilla, or something based on Build.PL based on the presence of the files "Makefile.PL", "Build.PL", or "dist.ini", and creates the correct jobs based on that. - Runs the test suite (using prove) and reports the test findings back to gitlab; - Captures code coverage (using Devel::Cover) and reports that to gitlab, both so that you can see in an MR whether a line was covered by a test, and so that the total coverage percentage is reported on test jobs and in history graphs; - Runs perlcritic on your code (this can be switched off) - Defaults to building and testing your code on the perl:latest container, but you can change that and/or provide a list of container tags on which to build and test; - Supports creating a release in the gitlab "releases" system, if configured to do so. Still TODO is add support for pushing to PAUSE, but I need to come up with a safe way to do that, and doing something to generate and upload SBOM files. To use, on gitlab.com, simply add a file ".gitlab-ci.yml" to the top of your git repository that has this as its contents: include: - component: $CI_SERVER_FQDN/wuter/perl-component/component@1 There are a number of other options you can set; for the full story, read the README at https://gitlab.com/wuter/perl-component On other gitlab instances, you will need to mirror the component to your local gitlab installation and then point to that (you can't include a component from a different location). I have done this for salsa.debian.org, fwiw, as wouter/perl-component (my user name is not the same on both instances). For comments or feature requests, preferably just use the issues system in the perl-component repository on gitlab.com. Hope this helps anyone... -- "I never had a C in history!" "Yeah, but there was so much less of it when you were my age!" -- Joe Brockmeier recounting a conversation with his father, cfgmgmtcamp 2026, Ghent