Skip to content

Conversation

Lirt
Copy link

@Lirt Lirt commented May 9, 2025

This change allows passing multiple variables files as input to CLI. Order of files is important as overlapped non-empty keys in yaml or json files will be overwritten by subsequent file.

This change is backwards compatible because CLI library implements slice definition as repetition of the --vars argument. Using goss with single file produces the same outputs with the code change as it was before.

Usage:

./goss --vars file1.yaml --vars file2.yaml validate
Checklist

make test-all doesn't exist anymore. Probably should be make test-int-all. make test passes correctly.

  • make test-all (UNIX) passes. CI will also test this
  • unit and/or integration tests are included (if applicable)
  • documentation is changed or added (if applicable)

Description of change

Closes #1023


📚 Documentation preview 📚: https://goss--1024.org.readthedocs.build/en/1024/

@Lirt Lirt requested a review from aelsabbahy as a code owner May 9, 2025 12:24
@Lirt Lirt force-pushed the args/varsfile-slice branch from fdbab51 to ffcaea0 Compare May 9, 2025 12:32
This change allows passing multiple variables files as input to
CLI. Order of files is important as overlapped non-empty keys in yaml or json
files will be overwritten by subsequent file.

This change is backwards compatible as CLI library makes the slice
definition to be repetition of the --vars argument. Using goss with
single file produces same outputs with this code change as it was before.

Usage:
```
./goss --vars file1.yaml --vars file2.yaml validate
```

Issue ref: goss-org#1023

Signed-off-by: Ondrej Vasko <ondrej.vaskoo@gmail.com>
@Lirt Lirt force-pushed the args/varsfile-slice branch from ffcaea0 to 3819332 Compare May 9, 2025 12:35
@Lirt
Copy link
Author

Lirt commented Jul 1, 2025

Hello @aelsabbahy,

any time expectation when you could look at this change?

@Lirt
Copy link
Author

Lirt commented Aug 29, 2025

Ping for visibility. If there is low amount of maintainers, I can offer my help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple vars files

1 participant