Why Won t My AWS CDK Code Build in AWS Code Pipelines

0 votes

I am getting the error Phase context status code during the AWS Code Pipeline Build Stage. COMMAND EXECUTION ERROR Message: npm ci command execution error. the departure status is 254

The deployment of new changes to the Code Commit Repository and the successful deployment of the Cloud Formation Stacks, similar to cdk deploy —all, are the desired results.


I adhered to the AWS tutorial. Everything is successfully deployed.

The Code Pipeline Stack:

export class CodePipelineStack extends Stack {
    private readonly codePipeline: CodePipeline;
    private readonly codeRepository : Repository;

    constructor(scope: Construct, id: string, props: StackProps, context: CDKContext){
        super(scope, id, props);

        this.codeRepository = new Repository(this, "Repo-CDK", { repositoryName: "Repo-CDK", description: "Building A Repo using CDK Methodology" });

        this.codePipeline = new CodePipeline(this, "pipeline", {
            pipelineName: "pipeline",
            selfMutation: true,
            synth: new ShellStep('DeploymentStep', {
              input: CodePipelineSource.codeCommit(this.codeRepository, environment),
              commands: ['npm ci', 'npm run build', 'npx cdk synth'],
            })
          });
    }
}

I also have app.synth(); at the bottom of the function that builds the stacks.

Dec 30, 2022 in AWS by Tejashwini
• 3,820 points

edited 5 days ago 10 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP