Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to reduce my Build time by caching docker images

venkatcss September 4, 2019

Hi Team,

I want to reduce the my build time,  pipeline is taking nearly 9 minutes to complete.

Can you please suggest.

I have used cache also. for reference I have mentioned my configuration file.

if possible please change my configuration file accordingly  that could helpful for me.

 

Bitbucket-pipeline.yml

---

image: "node:10.15.0"

pipelines:

   branches: 

       development: 

           -

             step:

                 deployment: test

                  name: "install and build"

                  caches:

                      - node

                  script:

                      - "apt-get update -y"

                      - "apt-get install -y zip"

                      - "cd admin/front-end"

                      - "npm install"

                      - CI=false

                      - "npm run build"

                      - "zip -r /tmp/artifact.zip *"

                trigger: automatic

                 artifacts:

                     - admin/front-end/build/**

                 - 

                    step:

                       image: "python:3.5.7"

                       name: test

                       caches:

                           - pip

                       script:

                          - "apt-get update -y"

                          - "pip install boto3==1.9.197"

                          - "apt-get install -y zip"

                          - "zip -r /tmp/artifact.zip *"

                          - "python codedeploy_deploy.py"

 

Regards,

Venkat

 

 

 

 

 

1 answer

0 votes
DPKJ
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 5, 2019

@venkatcssyou can build and use private docker images with all dependencies.

By looking at you pipeline you are just,

  • Installing
    • ZIP
    • boto3
  • Running
    • apt-get update

You can include these in your custom docker image.

Rest of the pipeline is dependent on code base, so I would not suggest making them part of image.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events