in reply to Perl images for GitLab CI

Ken,

What I've been doing is a `docker pull ...` of the image I want to CI/CD with and then manually running a Docker container from it `docker run ...` and then basically stepping through the steps I'd put in my .gitlab-ci.yml file. This way I can catch any missing dependencies, any download certificate issues from my $work proxy, any packages / modules I "assume" are in the build but aren't and need to be `cpan install ...` ...

When I'm happy with that, then I create my .gitlab-ci.yml from my build notes and cross fingers it works the same! Most of the time it does. Note if you're going to do this for perl:5.16, perl:5.18, etc... I'd redo the steps for each just to make sure and then create a multi-step .gitlab-ci.yml that'll test them all.

Hope that helps!

Cheers.

Replies are listed 'Best First'.
Re^2: Perl images for GitLab CI
by kcott (Archbishop) on May 05, 2022 at 12:10 UTC

    G'day VinsWorldcom,

    ++ That's very interesting.

    I haven't done this previously and, from the first few links I posted in the OP, it seemed like creating .gitlab-ci.yml first was the way to go. I'd planned to deal with the container aspects later. Perhaps I'm approaching this from the wrong end.

    Yes, I had planned on multiple steps as in the "DBD::Mock: .gitlab-ci.yml" (mentioned in the OP).

    As those steps are all going to be identical, except for the image: parts, it would be preferable if that could be put in a loop; along the lines of:

    for my $tag (qw{5.16 5.18 ... 5.32 5.34 latest}) { ... image: perl:$tag ... }

    I'll look for some way to do that; if not, then it's the WET (non-DRY) approach.

    — Ken