CodeBuild takes long time to start build

0

Hi AWS, when I start build it takes time about 2 mins to start the build after that it takes much time about 3 mins to build the image P.S. we pull the image from ECR then start building it, and on running the test cases it takes long time about 9 mins to start the testing steps so overall the build takes about 18-20 mins/build which is too much time

the build should start under these conditions PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED, PULL_REQUEST_REOPENED from Github,

we work on eu-Central-1 (Frankfurt) with compute 15 GB memory, 8 vCPUs Privileged is true also I have enabled the local cache which did nothing

asked a year ago349 views
1 Answer
0

Hello,

I would like to state that the initial process for Provisioning and Building an image might take some time because to pull the image, you would need to access ECR endpoint, login to ECR, get the image, then download the image. So it would require a short amount of time to do that.

Coming on to the testing steps for the build. The test case for the build to run might short amount of time or a long amount of time depending on the test cases. For example if you just have ECR login as a test then it would short amount of time. However, if your build contains a chain of command and use-case which need to be validated or run in order to get an output, then it might take more time for the total build to complete.

It also depends on the source code repo, whether the test is being performed on the source code or not. This might also be related to the long wait time for build.

Please refer the following document on how to Improve Build Performance and Save Time Using Local Caching in AWS CodeBuild: [+] https://aws.amazon.com/blogs/devops/improve-build-performance-and-save-time-using-local-caching-in-aws-codebuild/

Note - Please refer to the type of caching best suited for your use-case.

AWS
SUPPORT ENGINEER
answered a year ago
  • Hello, The initial state I meant the very first beginning when I click start build it takes too long to start on the very first command of the pipeline which is not pulling the image or login to ECR it's some other commands, it really takes about 2 mins to start the first command,

    and about the testing yeah we use test case scenarios so yeah you're right it may be a code thing,

    and about the local caching I have tried it already and nothing differs

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions