CLI Ingredient Create Command (Bulk)¶
The vdc ingredient create
command allows you to create multiple ingredients with identical attributes using a YAML definition file. This is particularly useful when setting up new projects, segments, or silicon stepping variations that require many similar ingredients.
Command Syntax¶
Required Parameters¶
--project <project>
: The project name in VDC (REQUIRED)--path <path>
: Path to the YAML definition file (REQUIRED)
Optional Parameters¶
--feed <feed>
: The feed name (optional, can be specified in YAML)--verbose
: Enable detailed logging for debugging--token <token>
: Authentication token
Options Reference¶
Option | Shortcut | Description | Required | Example |
---|---|---|---|---|
--project <project> |
-p | Target project name | Yes | --project validation-team |
--feed <feed> |
-f | Target feed name | No | --feed main |
--path <path> |
Path to YAML definition file | Yes | --path ingredients.yaml |
|
--verbose |
Enable detailed logging | No | --verbose |
|
--token <token> |
Authentication token | Yes | --token $VDC_TOKEN |
Usage Examples¶
Basic Ingredient Creation¶
# Create ingredients from YAML definition
vdc ingredient create -p validation-team -f main --path ./ptl-ifwi-ingredients.yaml --token $VDC_TOKEN
# With verbose logging for debugging
vdc ingredient create -p validation-team -f main --path ./ptl-ifwi-ingredients.yaml --verbose --token $VDC_TOKEN
# Using long form parameters
vdc ingredient create --project validation-team --feed main --path ./ptl-ifwi-ingredien
YAML Definition Format¶
Minimal YAML Example¶
# simple-ingredients.yaml
names:
- MY_COMPONENT_V1
- MY_COMPONENT_V2
- MY_COMPONENT_V3
description: ""
ingredientType: "UPATCH"
silicon: "DMR"
segment: "DMR-AP"
step: "A0"
milestones:
- Mil1
- Mil2
hasPackages: true
hasDependencies: true
validationDiscipline: "FV"
isOfficial: true
YAML Fields Reference¶
Field | Type | Required | Description |
---|---|---|---|
names |
array | Yes | List of ingredient names to create |
description |
string | No | Ingredient description |
ingredientType |
string | Yes | Type of ingredient (e.g., "IFWI", "BIOS") |
silicon |
string | No | Silicon family (e.g., "PTL", "NVL") |
segment |
string | No | Silicon segment (e.g., "PTL-P") |
step |
string | No | Silicon steps (e.g., "A0") |
milestones |
array | No | Silicon milestones |
hasPackages |
boolean | No | Whether ingredients will have package files |
hasDependencies |
boolean | No | Whether ingredients will have dependencies |
validationDiscipline |
string | No | Validation discipline (e.g., "FV", "PIV") |
isOfficial |
boolean | No | Whether ingredients are official |
Best Practices¶
YAML File Organization¶
- Consistent Naming: Use systematic naming conventions
- Logical Grouping: Group related ingredients with comments
- Version Control: Store YAML files in version control
- Validation: Test YAML syntax before execution
Batch Creation Strategy¶
#!/bin/bash
# Batch ingredient creation script
PROJECTS=("ptl-validation" "nvl-validation" "dmr-validation")
FEED="main"
for project in "${PROJECTS[@]}"; do
echo "Creating ingredients for $project..."
vdc ingredient create \
--project "$project" \
--feed "$FEED" \
--path "./ingredients-${project}.yaml" \
--token "$VDC_TOKEN"
done
Error Handling¶
Common Errors¶
Invalid YAML Format¶
# Error: YAML syntax error
# Solution: Validate YAML syntax
# Test YAML validity (if you have yq installed)
yq eval '.' ingredients.yaml
Validate YAML
To validate you YAML file you can use a Validator tool
Duplicate Ingredient Names¶
# Error: Ingredient already exists
# Solution: Check existing ingredients first
# Verify ingredient doesn't exist
vdc ingredient get --project myproject --feed main --name EXISTING_INGREDIENT --token $VDC_TOKEN
Invalid Ingredient Type¶
Invalid silicon settings¶
Related Commands¶
- Get Ingredient Info - Retrieve ingredient information and metadata
- Release Commands - Submit, download, and manage ingredient releases
Next Steps¶
After Creating Ingredients¶
- Get Ingredient Info - Verify ingredients were created successfully
- Release Commands - Submit releases for your new ingredients
Learn More About Ingredients¶
- Understanding Ingredients - Core ingredient concepts
- Ingredient view - Web interface for ingredient management
Integration and Automation¶
- Main CLI overview - Complete CLI capabilities
- Getting Started - Essential commands reference