-
Notifications
You must be signed in to change notification settings - Fork 51
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
Document the _
placeholder
#971
Document the _
placeholder
#971
Conversation
Build succeeded. ✔️ pre-commit SUCCESS in 1m 23s |
785d17c
to
1f8b862
Compare
Build succeeded. ✔️ pre-commit SUCCESS in 1m 20s |
Add a yaml placeholder Users can use this placeholder to put anchors that would otherwise be invalid keys in the config file, e.g. _: internal-test: &internal-test job: tests use_internal_tf: True jobs: - <<: *internal-test targets: [ fedora-latest ] tmt_plan: "/plans/core" - <<: *internal-test targets: [ epel-9 ] require: label: present: - full Notice how in this example we cannot create a reusable anchor from either the fedora or the epel job because it would automatically inherit either tmt_plan or require.* values. Allowing a placeholder where one could define some definitions for later usage would make designing the yaml file a bit easier in some cases. Feel free to propose any naming convention for this placeholder TODO: Write new tests or update the old ones to cover new functionality. Update or write new documentation in packit/packit.dev. packit/packit.dev/pull/971 Fixes Related to Merge before/after RELEASE NOTES BEGIN Packit configuration file can now have a placeholder top-level key _ that is ignored when read. This is useful for storing yaml anchors in complex config files, e.g.: _: base-test: &base-test job: tests fmf_path: .distro jobs: - <<: *base-test trigger: pull_request manual_trigger: true - <<: *internal-test trigger: commit use_internal_tf: true RELEASE NOTES END Reviewed-by: Matej Focko Reviewed-by: Laura Barcziová
Build succeeded. ✔️ pre-commit SUCCESS in 1m 40s |
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 23s |
1718cd4
into
packit:main
Related to packit/packit/pull/2378