Objective:
Enable the YAML configuration to reference and include another YAML file to define folder structures within a specified directory. This enhancement will allow users to modularize their project structures by including external YAML definitions.
Requirements:
-
YAML Reference Syntax:
- Allow the
struct keyword in the YAML configuration to specify the path to another YAML file.
- The referenced YAML file will define additional folder structures and files to be created within the specified directory.
-
Example Usage:
- The following example demonstrates how to use the
struct keyword to include another YAML file for defining the structure within the .devops/apps/myapp/ directory:
folders:
- .devops/apps/myapp/:
struct: terraform-app
-
Implementation Details:
- Parse the main YAML configuration.
- Identify the
struct keyword and its associated file path.
- Read and parse the referenced YAML file.
- Merge the folder structure defined in the referenced YAML file into the specified directory in the main configuration.
- Ensure proper error handling for cases where the referenced YAML file is missing or contains invalid configurations.
-
Error Handling:
- If the referenced YAML file does not exist, log an error and skip the structure creation for that entry.
- If the referenced YAML file contains invalid YAML syntax or structure, log an error and skip the structure creation for that entry.
-
Testing:
- Add unit tests to verify that the main YAML configuration correctly references and includes the structure defined in external YAML files.
- Test edge cases, such as missing files, invalid YAML syntax, and circular references.
Objective:
Enable the YAML configuration to reference and include another YAML file to define folder structures within a specified directory. This enhancement will allow users to modularize their project structures by including external YAML definitions.
Requirements:
YAML Reference Syntax:
structkeyword in the YAML configuration to specify the path to another YAML file.Example Usage:
structkeyword to include another YAML file for defining the structure within the.devops/apps/myapp/directory:Implementation Details:
structkeyword and its associated file path.Error Handling:
Testing: