Merge ~artivis/lpci:feature/yaml-include into lpci:main
Status: | Needs review |
---|---|
Proposed branch: | ~artivis/lpci:feature/yaml-include |
Merge into: | lpci:main |
Prerequisite: | ~artivis/lpci:feature/yaml-alias-filter |
Diff against target: |
388 lines (+304/-4) (has conflicts) 4 files modified
lpcraft/config.py (+1/-1) lpcraft/tests/test_config.py (+211/-2) lpcraft/tests/test_utils.py (+21/-1) lpcraft/utils.py (+71/-0) Conflict in lpcraft/tests/test_config.py |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Launchpad code reviewers | Pending | ||
Review via email: mp+435460@code.launchpad.net |
Description of the change
[Do Not Merge Yet]
Note: This is based on top of another branch (https:/
Add support for yaml inclusion.
This allows for including other yaml files to a configuration file using the 'include' tag located at the root. Included file paths can be relative or absolute. Since yaml anchors are lost during the inclusion, this MP also introduce the 'extends' tag that essentially does the work of mapping.
Hereafter is an example of what that looks like,
# .included.
.test:
series: bionic
architectures: [amd64]
# .launchpad.yaml
pipeline:
- test
include:
- .included.
jobs:
test-a:
series: focal
architect
test-b:
extends: .test # maps '.test' nested entries
packages: [file] # can be further extended with new entries
[Do Not Merge Yet]
Unmerged commits
- 1bee04c... by jeremie
-
test:0 (build) build:0 (build) 1 → 2 of 2 results First • Previous • Next • Last - e1c0554... by jeremie
- 5e3aa4f... by jeremie
-
test:0 (build) build:0 (build) 1 → 2 of 2 results First • Previous • Next • Last - 31e792a... by jeremie
Similar to the notes on YAML aliases, let's discuss whether an external tool / script could be a viable solution. /chat.canonical .com/canonical/ pl/r71cgk3ejtr1 zmbfnfitbi187c
https:/