0
votes

I m trying to setup my CI/CD process with Bitbucket, CodeBuild and CodePipeline. So far, I have Webhook on Bitbucket that will run CodeBuild on custom docker image from ECR and upload the artifacts to Amazon S3 bucket which has versions enabled in it. The new upload triggers the CodePipeline based on the Cloudwatch event and runs another CodeBuild after Manual approve which makes the deployment on new S3 bucket which is fine till now. The CodePipeline has 3 stages: Source (s3),-> Manual Approve -> CodeBuild.

The problem is: When I tried to push multiple branches/new commits, the first CodeBuild runs and upload artifacts on S3 with different versions as expected. However, each upload should trigger each CodePipline. If I had made 3 different code push to the Bitbucket Repository, there should be three Pipelines waiting for Manual approval to be deployed. But this isn't the case.

I have three artifacts uploaded in S3 with different VersionID based on the commits:

1st commit's artifacts VersionID: OKIBabVQQX80aAuARAne8jnClsTpJGXu

2nd commit's artifacts VersionID: YNsgp9rodnAx7du1Te1OQD2UO0t5IZc

3rd commit's artifacts VersionID: VN7pwVS5zpYNTmzJrLbFGKBupogpgtHN

In CodePipeline:

Stage: Manual Approve is waiting for approval which has S3 Source Version: OKIBabVQQX80aAuARAne8jnClsTpJGXu

Stage: Source is triggered from S3 with VersionID: VN7pwVS5zpYNTmzJrLbFGKBupogpgtHN

Here I am completely missing the 2nd artifacts: (s3 VersionID: YNsgp9rodnAx7du1Te1OQD2UO0t5IZc ) I would expect all three artifacts to trigger the CodePiple one after another so that I can deploy all my 3 push.

Many many thanks!!!

1

1 Answers

1
votes

When a pipeline execution starts, it runs a revision through every stage and action in the pipeline. Start a Pipeline Execution in CodePipeline

Code pipeline stage shows the last trigger for particular the stage. In your case you have:

  • Artifact1 triggered Source and Manual Approve.
  • Artifact2 triggered Source and waiting to trigger Manual Approval.
  • Artifact3 triggered Source and waiting to trigger Manual Approval.

Since your Artifact3 comes after Artifact2 - the Source stage shows it (the last trigger). Artifact2 is not shown but still waiting for its turn. Once you finish with Artifact1 on Manual Approval stage, the Artifact2 would appear at Manual Approval. After it, Artifact3 would go to Manual Approval stage and so on.