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

Bitbucket caching

venkatcss August 23, 2019

Hi Team,

I have added  bit-bucket cache into my configuration file.

After added when i ran the pipeline  still it's same build time it's took the pipeline.

So please check it. is it correct or any change  on my configuration file on cache part..

if any modification please change on that 

 

Please reply ASAP

 

"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
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2019

Hello @venkatcss,

Your configuration looks valid.

How many times did you run the pipeline after enabling the cache? If only once, cache wasn't applied because it hasn't existed yet, it has been generated and saved after first run with that config.

You can check if cache was saved if you expand Build teardown section in the Pipeline log:

 Pipelines — Bitbucket 2019-08-23 16-45-20.png

Similarly, you can check if the cache was downloaded and used during the build if you expand Build setup section:

 Pipelines — Bitbucket 2019-08-23 16-47-12.png

Hope this helps.

Cheers,
Daniil

venkatcss August 25, 2019

Cache-dependecy.PNGHi  Daniil,

Thanks for your reply, I have run the pipeline 2 times  those screenshots, I have attached here please find it.

And can you please check it all are correct or not. but even I didn't find the any difference on build time.

Here On pipeline left side cache-dependency i found only "pip " i didn't find "node"

please check it i have attached screenshot's all.

 

Note:-

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,

venkat1st time -Build teardown.PNG1st time-Build setup.PNG2nd Build teardown.PNG2nd build-setup.PNG

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events