Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallelization in AWS codebuild #555

Open
sridhar562345 opened this issue Jun 4, 2022 · 1 comment
Open

Parallelization in AWS codebuild #555

sridhar562345 opened this issue Jun 4, 2022 · 1 comment

Comments

@sridhar562345
Copy link

version: 0.2
batch:
   fast-fail: true
   build-matrix:
      static:
         ignore-failure: false
         env:
            privileged-mode: true
      dynamic:
         env:
            variables:
               WORKERS:
                  - 1
                  - 2
                  - 3
phases:
   pre_build:
      commands:
         - npm install cypress --save-dev
         - yarn run cy:verify
         - yarn run cy:info
         - sysctl fs.inotify.max_user_watches

   build:
      commands:
         - yarn install
         - REACT_APP_SSO_ENABLED=false yarn start & npx wait-on http://localhost:3000
         - yarn run:cypress-parallel-tests

The yarn install command running in each codebuild batch and taking a long time, how can i modify the buildspec to only run this only once and not in all parallel builds?

@Damola12345
Copy link

hi @sridhar562345 to improve your build performance you've to set up Local Caching in AWS CodeBuild
something like this
cache:
paths:
- '/root/.m2//*'
- '/root/.npm/
/'
- 'build/**/
'

check this aws documentation ( https://aws.amazon.com/blogs/devops/improve-build-performance-and-save-time-using-local-caching-in-aws-codebuild/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants