We are using the pre-defined docker cache from bitbucket pipeline.
Until about a month ago the caching worked like a charm and build times for our django backend were in the order of 1min. If we rebuild that same commit with the pipeline today we have a build time of 6min even if the cache is properly populated.
Has anybody experienced a similar behavior?
Here is our bitbucket-pipeline.yml file:
image: docker/compose:1.25.0-rc2-alpine
options:
docker: true
definitions:
steps:
- step: &build-test-django
name: Build and test of Django
caches:
- docker
script:
- docker-compose -f docker-compose.yml run django pytest
- step: &build-test-frontend
name: Build and test frontend
caches:
- docker
script:
- docker-compose -f docker-compose.yml run -e CI=true frontend bash -c "npm install && npm test"
services:
docker:
memory: 2048
pipelines:
pull-requests:
'**':
- parallel:
- step: *build-test-django
- step: *build-test-frontend
branches:
develop:
- parallel:
- step: *build-test-django
- step: *build-test-frontend
master:
- parallel:
- step: *build-test-django
- step: *build-test-frontend
Same problem for us.
Per support agent request – looks like you cannot use the same docker
cache for both steps!
We tried using the docker cache for the frontend and the backend build in parallel. After removing the docker cache from the 'build-test-frontend' step. Caching for the backend is working again and the build times are reduced.
This is a workaround since ideally the cache would be used for the frontend and backend build.
Here is the updated section of the bitbucket-pipeline.yml file:
- step: &build-test-frontend
name: Build and test frontend
script:
- docker-compose -f docker-compose.yml run -e CI=true frontend bash -c "npm install && npm test"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. Now that I understand your case in detail, I see that we aren't exactly in the same case.
Anyway, thank you for the help!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.