Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce cache size in pipeline

Rajat Jain May 29, 2018

I have created custom cache for pipeline.. where it exceeds the memory limit to .34 GB (total cache was 1.34 GB) which is not allowed in the pipeline. Here cache limit is 1 GB, if the size of cache is exceed it'll skip and does not create any cache.

image: python:3.6.2
pipelines:
default:
- step:
caches:
- condacache
script:
- /opt/python/bin/conda update -y conda
- /opt/python/bin/pip install --upgrade pip
- /opt/python/bin/pip install -r requirements.txt
- /opt/python/bin/pytest

definitions:
caches:
condacache: /opt/python

Here is my Script from pipeline please look and give suggestion how can i reduce my cache size and if i could ignore any script to save in cache.

1 answer

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2018

Hi Rajat,

Can you try replacing you caches section with the following?

definitions:
caches:
- pip

This will use the default caching directory pip modules. As noted here: https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html

By caching /opt/python, you're also caching all the binary files. Which is contributing to your large cache, and doesn't need to be cached as it's included in the python image.

Let me know if that works.

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events