trigger_pipeline
Initiate pipeline execution in AWS CodePipeline by specifying the pipeline name, enabling streamlined automation and deployment processes through natural language commands.
Instructions
Trigger a pipeline execution
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pipelineName | Yes | Name of the pipeline |
Implementation Reference
- src/tools/trigger_pipeline.ts:18-44 (handler)The main handler function that executes the tool logic: triggers a CodePipeline execution using the provided pipelineName and returns the execution ID.export async function triggerPipeline( codePipelineManager: CodePipelineManager, input: { pipelineName: string; } ) { const { pipelineName } = input; const codepipeline = codePipelineManager.getCodePipeline(); const response = await codepipeline.startPipelineExecution({ name: pipelineName }).promise(); const executionId = response.pipelineExecutionId || ''; return { content: [ { type: "text", text: JSON.stringify({ message: "Pipeline triggered successfully", executionId }, null, 2), }, ], }; }
- src/tools/trigger_pipeline.ts:3-16 (schema)Input schema definition for the trigger_pipeline tool, specifying the required pipelineName parameter.export const triggerPipelineSchema = { name: "trigger_pipeline", description: "Trigger a pipeline execution", inputSchema: { type: "object", properties: { pipelineName: { type: "string", description: "Name of the pipeline" } }, required: ["pipelineName"], }, } as const;
- src/index.ts:167-171 (registration)Registration in the tool dispatch switch case: handles calls to 'trigger_pipeline' by invoking the triggerPipeline handler.case "trigger_pipeline": { return await triggerPipeline(codePipelineManager, input as { pipelineName: string; }); }
- src/index.ts:118-118 (registration)Registration of the tool schema in the listTools response array.triggerPipelineSchema,
- src/index.ts:35-37 (registration)Import of the handler function and schema from the tools module.triggerPipeline, triggerPipelineSchema } from "./tools/trigger_pipeline.js";