Closed heydonovan closed 1 month ago
Hmm, I cannot reproduce on NixOS.
$ cat .gitlab-ci.yml
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID == null
build:docker:
stage: build
image: docker:24
rules:
- if: $DISABLE_BUILD == "true"
when: never
- when: always
script: pwd
variables:
DISABLE_BUILD: "false"
$ npx gitlab-ci-local@4.52.2 --list
Using fallback git commit data
Unable to retrieve default remote branch, falling back to `main`.
Using fallback git remote data
parsing and downloads finished in 53 ms.
json schema validated in 209 ms
name description stage when allow_failure needs
build:docker build always false
@heydonovan Does the job only not appear in --list
, or does it also not run? That is, what happens if you just run gitlab-ci-local
without any arguments? What happens if you run gitlab-ci-local "build:docker"
?
Edit: Well this was fun! Turns out DISABLE_BUILD: "true"
was defined in ~/.gitlab-ci-local/variables.yml
. ðŸ˜
Forgot that file existed. I'll echo those variables before each run, just to remember them. Thanks y'all!
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior There should be a
build:docker
job listed when runninggitlab-ci-local --list
.Host information
Containerd binary
Additional context This used to work, trying to figure out what version changed it. Even running
--list-all
shows it as never: