Skip to content

Ingredient Commands

Ingredient commands allow you to discover, explore, and manage ingredients across all VDC projects. These commands are essential for understanding what ingredients are available and creating new ingredients efficiently.


Available Commands

Command Purpose When to Use
VDC ingredient get Retrieve ingredient information and metadata Discovery, validation, automation scripting
VDC ingredient create Create multiple ingredients with shared attributes Bulk setup, silicon onboarding, project initialization

Quick Command Reference

Get Ingredient Information

# Basic ingredient lookup
vdc ingredient get --project PROJECT --feed FEED --name INGREDIENT --token $VDC_TOKEN

# Human-readable output
vdc ingredient get --project PROJECT --feed FEED --name INGREDIENT --format yaml --token $VDC_TOKEN

# Using ingredient ID
vdc ingredient get --id INGREDIENT_ID --token $VDC_TOKEN

Create Multiple Ingredients

# Create ingredients from YAML definition
vdc ingredient create --project PROJECT --feed FEED --path ingredients.yaml --token $VDC_TOKEN

Common Use Cases

Discovery and Exploration

  • Find available ingredients in a project or feed
  • Understand ingredient properties like type, silicon family, and release count
  • Validate ingredients exist before using in workflows or scripts
  • Extract metadata for reporting and analysis

Bulk Ingredient Setup

  • Silicon onboarding - Create dozens of similar ingredients for new silicon families
  • Project initialization - Set up ingredient structure for new teams
  • Standardization - Ensure consistent ingredient attributes across projects

Typical Workflows

1. Ingredient Discovery Workflow

# Step 1: Check if ingredient exists
vdc ingredient get --project validation-team --feed main --name IFWI_NVL --token $VDC_TOKEN

# Step 2: Analyze the output for key properties
# - IngredientType: What kind of component
# - ReleaseCount: How many versions available  
# - HasPackages: Whether releases include files
# - Silicon: Associated silicon family

# Step 3: Get additional ingredients for comparison
vdc ingredient get --project validation-team --feed main --name BIOS_NVL --format yaml --token $VDC_TOKEN

2. Bulk Ingredient Creation Workflow

# Step 1: Create YAML definition file
cat > ingredients.yaml << EOF
names:
  - PTL_COMPONENT_A
  - PTL_COMPONENT_B  
  - PTL_COMPONENT_C
ingredientType: "IFWI"
silicon: "PTL"
hasPackages: true
hasDependencies: true
EOF

# Step 2: Create all ingredients
vdc ingredient create --project validation-team --feed main --path ingredients.yaml --token $VDC_TOKEN

# Step 3: Verify creation
vdc ingredient get --project validation-team --feed main --name PTL_COMPONENT_A --token $VDC_TOKEN

Best Practices

For Discovery

  1. Use YAML format for human-readable exploration: --format yaml
  2. Check key properties like HasPackages and HasDependencies before use
  3. Validate access to ingredients before building automation around them
  4. Use ingredient IDs for stable references in automation scripts

For Bulk Creation

  1. Plan naming conventions before creating ingredients
  2. Use consistent attributes across similar ingredients
  3. Organize by silicon family or project structure
  4. Test with small batches before creating large numbers of ingredients

For Automation

  1. Handle errors gracefully - ingredients may not exist or be accessible
  2. Use environment variables for project/feed names to make scripts portable
  3. Cache ingredient information when possible to reduce API calls
  4. Implement retry logic for network reliability

Error Handling

Common Issues

  • Ingredient not found: Check project/feed/name spelling and access permissions
  • Authentication failed: Verify token is valid and user has project access
  • Invalid YAML format: Validate YAML syntax before ingredient creation
  • Duplicate ingredients: Ingredient names must be unique within a feed

Debugging Tips

# Use verbose mode for detailed error information
vdc ingredient get --project PROJECT --feed FEED --name INGREDIENT --verbose --token $VDC_TOKEN

# Test authentication first
vdc ingredient get --help

# Verify project access with a known ingredient
vdc ingredient get --project validation-team --feed main --name IFWI_NVL --token $VDC_TOKEN

Next Steps

Ready for Detailed Commands?

Need to Work with Releases?

Want Advanced Operations?