Thursday, August 11, 2022

Resolve "Kitchen.yml does not exist" Issue in Azure Pipelines with Execute Chef Component Task

You might encounter "kitchen.yml does not exist" issue with execute chef component task in Azure pipelines. Reason for this failure is, Azure DevOps pipeline task is looking for the kitchen.yml file in the Build.SourcesDirectory by default. Further, there is no parameter to pass the kitchen.yml file location with kitchen create command.

Issue



Fix

To fix the issue, you can add kitchen.yml file path to environment variable KITCHEN_YAML in the advanced section of the Execute Chef Component task in Azure DevOps pipeline.


Expand  Advanced section of the Execute Chef Component task and add environment variable to correct location of the kitchen.yml file as shown in the following image.


Run pipeline again. Pipeline will locate the kitchen.yml file successfully.


No comments:

Post a Comment