We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug if I escape the skip part I got and unmarshal error
visualstudio: exec: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe -nologo -version exit-status: 0 stdout: - /16\.\d+\.\d+\.\d+/ skip: '{{ not (eq .Env.AGENT_OS_VERSION "2019") }}'
export GOSS_USE_ALPHA=1; export AGENT_OS_VERSION=2022; goss -g ./goss/goss-windows.yaml render 2024/05/14 14:30:33 yaml: unmarshal errors: line 62: cannot unmarshal !!str `true` into bool
but if I don't escape then the yaml seems to be wrong as told by https://github.com/goccy/go-yaml/tree/master (used within updatecli):
visualstudio: exec: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe -nologo -version exit-status: 0 stdout: - /16\.\d+\.\d+\.\d+/ skip: {{ not (eq .Env.AGENT_OS_VERSION "2019") }}
ERROR: something went wrong in target "updateJDK21VersionInGoss" : "updating yaml file: parsing yaml file: [62:12] unexpected mapping key\n 59 | exit-status: 0\n 60 | stdout:\n 61 | - /16\\.\\d+\\.\\d+\\.\\d+/\n > 62 | skip: {{ not (eq .Env.AGENT_OS_VERSION \"2019\") }}\n ^\n 63 | file:\n 64 | C:\\Program Files\\Chromium\\Application\\:\n 65 | contains: []"
How To Reproduce everything is public here : https://github.com/jenkins-infra/packer-images from the goss file: https://github.com/jenkins-infra/packer-images/blob/main/goss/goss-windows.yaml to one of the updatecli manifest that break if the skip line is not escape: https://github.com/jenkins-infra/packer-images/blob/main/updatecli/updatecli.d/jdk21.yml
export GOSS_USE_ALPHA=1; export AGENT_OS_VERSION=2022; goss -g ./goss/goss-windows.yaml render
updatecli diff --values ./updatecli/values.yaml --config ./updatecli/updatecli.d/jdk21.yml
Expected Behavior that this version:
or
visualstudio: exec: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe -nologo -version exit-status: 0 stdout: - /16\.\d+\.\d+\.\d+/ skip: | {{ not (eq .Env.AGENT_OS_VERSION "2019") }}
manage to convert true or false string to boolean
true
false
Actual Behavior error line 62: cannot unmarshal !!str true into bool
Environment:
goss version v0.4.2
The text was updated successfully, but these errors were encountered:
in fact the online version should be seen as correct yaml, changing the engine on the updatecli solved the issue.
Sorry, something went wrong.
Sounds like updatecli had/has the bug?
not really, but depending on the yaml engine used, it's seen as wrong yaml ... the smart thing about updatecli is that you can choose your yaml engine
No branches or pull requests
Describe the bug
if I escape the skip part I got and unmarshal error
but if I don't escape then the yaml seems to be wrong as told by https://github.com/goccy/go-yaml/tree/master
(used within updatecli):
How To Reproduce
everything is public here : https://github.com/jenkins-infra/packer-images
from the goss file: https://github.com/jenkins-infra/packer-images/blob/main/goss/goss-windows.yaml
to one of the updatecli manifest that break if the skip line is not escape: https://github.com/jenkins-infra/packer-images/blob/main/updatecli/updatecli.d/jdk21.yml
export GOSS_USE_ALPHA=1; export AGENT_OS_VERSION=2022; goss -g ./goss/goss-windows.yaml render
updatecli diff --values ./updatecli/values.yaml --config ./updatecli/updatecli.d/jdk21.yml
Expected Behavior
that this version:
or
manage to convert
true
orfalse
string to booleanActual Behavior
error
line 62: cannot unmarshal !!str
true
into boolEnvironment:
goss version v0.4.2
The text was updated successfully, but these errors were encountered: