Thank you so much for your very comprehensive answer. I’m still groping towards an answer here.
I backed out many of my random attempts and most recently have the following confusing results (which can be inspected here: https://gitlab.common-lisp.net/asdf/asdf/-/pipelines/13459). There are three jobs here (not in order), two of which are of immediate interest:
- The one for your
test_entry_override(`https://gitlab.common-lisp.net/asdf/asdf/-/jobs/104732), which appears to run as expected:
Executing "step_script" stage of the job script 00:00
Using effective pull policy of [always] for container rpgoldman/sbcl:trixie
Using docker image sha256:e563a364588c035d89409ee7fa079aeea6b3a2b83da8712785541c6dcd2cde8b for rpgoldman/sbcl:trixie with digest rpgoldman/sbcl@sha256:27edae485ae5d2a9c507e7912e43f2a67243d71ac09181e8400c6c7bae810005 ...
Custom entrypoint worked
- The one for ASDF build, which appears to show that overriding the entrypoint in the same way does not work (
https://gitlab.common-lisp.net/asdf/asdf/-/jobs/104730)
Executing "step_script" stage of the job script 00:01
Using effective pull policy of [always] for container rpgoldman/sbcl:trixie
Using docker image sha256:e563a364588c035d89409ee7fa079aeea6b3a2b83da8712785541c6dcd2cde8b for rpgoldman/sbcl:trixie with digest rpgoldman/sbcl@sha256:27edae485ae5d2a9c507e7912e43f2a67243d71ac09181e8400c6c7bae810005 ...
+ set -o
+ grep pipefail
+ set -o pipefail
+ set -o errexit
+ set +o noclobber
sh: 8: Syntax error: "do" unexpected
The second example appears to indicate that despite my entrypoint specification, the gitlab runner is using /bin/sh instead of /bin/bash.
Here are the two stanzas from the yaml file
test_entrypoint_override:
stage: build
rules:
- when: always
image:
name: rpgoldman/sbcl:trixie
entrypoint: ["/bin/bash", "-c", "echo 'Custom entrypoint worked'"]
script:
- echo "If you see this, entrypoint override is allowed"
- echo "Check above for 'Entrypoint override disabled' warning"
and
Build ASDF:
stage: build
image:
name: rpgoldman/sbcl:trixie
entrypoint: ["/bin/bash", "-c"]
script:
- echo "Running custom entrypoint."
- make
artifacts:
when: always
paths:
- build/asdf.lisp
So there’s definitely something funny going on with the entrypoint.
I’ve spent hours on this, so I should probably just fix the docker images and give up on figuring out the runner, but it’s unsatisfactory not to know what’s going on here.