YAML 1.1 bools (yes/no, on/off) are supported as long as they are being decoded into a typed bool value. Otherwise they behave as a string. Booleans in YAML 1.2 are true/false only.
Thank you for submitting this. Because this issue seems to be tied to the CLI rather than the orb, I am going to close this issue in this repository. The Issue you created #691 will serve to track this. Thank you.
Orb version:
11.1.2
What happened:
According to the CircleCI documentation, boolean parameters can have the following values:
y
yes
true
on
n
no
false
off
However, if a command parameter is declared as a boolean with a default value other than
true
orfalse
, the "Validating orb" step fails with:https://app.circleci.com/pipelines/github/orbiously/openvpn2-orb/53/workflows/b89b1c00-95d6-472b-aa8d-7f7158dcb9b2/jobs/334
Expected behavior:
The "Validating orb" step should pass if the boolean default value is any of:
y
yes
true
on
n
no
false
off
Additional Information:
Using:
circleci orb pack src > orb.yml
thencircleci orb validate orb.yml
produces the same output:And the generated
orb.yml
contains a string value:circleci config validate
on the below configuration file is successful:jobs:
build: parameters: killswitch: type: boolean default: on machine: image: ubuntu-2004:202201-02 steps:
command: | echo $KILLSWITCH workflows: build-and-release: jobs:
I suspect the issue is caused by the use of
"gopkg.in/yaml.v3"
in https://github.com/CircleCI-Public/circleci-cli/blob/master/cmd/config.go#L17.(Reference: https://pkg.go.dev/gopkg.in/yaml.v3#readme-compatibility)
Also see https://github.com/CircleCI-Public/circleci-cli/issues/691