Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Add support for Boolean extra-var interpretation" This future makes it impossible to pass "true" and "false" string arguments to the script #248

Open
zhengyongtao opened this issue Aug 27, 2024 · 1 comment
Labels

Comments

@zhengyongtao
Copy link

zhengyongtao commented Aug 27, 2024

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 24.10

Reproduction steps

                        extraVars: [
                            Tony: "true",
                            Alex: false,
                        ]

As in the example above, whether or not I add quotes to configure it as a string type, it will eventually be interpreted as a Boolean type. Causes the final parameters passed to the script to change from "true" and "false" to "True" and "False"

Expected Results

Correct pass string types "true" and "false"

Actual Results

The final parameters passed to the script to change from "true" and "false" to "True" and "False"

Anything else?

No response

Are you interested in contributing a fix?

No response

@zhengyongtao
Copy link
Author

zhengyongtao commented Aug 27, 2024

https://github.com/jenkinsci/ansible-plugin/pull/225/files
The function that causes this exception is this code, which bluntly converts all "true" and "false" to Boolean types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant