gitlab-ci-local
gitlab-ci-local copied to clipboard
only keyword
In Gitlab CI you can add the keyword "only" for a job that should only be executed if specified condition is met: https://docs.gitlab.com/ee/ci/yaml/#only--except
For example to execute only on tagged commits:
build:
script:
- echo "building"
only:
- tags
gitlab-ci-local seems to completely ignore that setting. I don't get an error but the job runs regardless of whether changes take place or not.
Gitlab relies on current commit for branch pipeline, and on new commits for MR pipeline.
But gitlab-ci-local does not rely on commits, for us to run the tool without having to commit each time.
How would you like that to work then ?
The only instruction is not implemented yet... You have to use rules: until it is...
Hello,
FYI, only/except are not actively developed, as of now even Gitlab recommends to use rules instead.
I'm closing this, gitlab will deprecate this option soon