Closed WCY91 closed 1 month ago
I believe the only
keyword is deprecated by gitlab.
You can use rules
instead.
---
job:
script:
- echo $TASK
- echo "This job runs only when the task variable is set to 'shift'."
rules:
- if: $TASK == "shift"
$ gitlab-ci-local --variable TASK=shift --list
name description stage when allow_failure needs
job test on_success false
$ gitlab-ci-local --variable TASK=other --list
name description stage when allow_failure needs
Thanks for reply my question ,I use the only condition on gitlab server it can work and I set variable value by .gitlab-ci-local-variables.yml
We are not going to implement this deprecated feature.
Minimal .gitlab-ci.yml illustrating the issue
Expected behavior the task value is not equal "shift" but it also can work when i run the gitlab ci-local
Host information Mac gitlab-ci-local latest
Containerd binary using docker