4

Bitbucket Pipelines pull the images every time that it start a pipeline. Since I start the tests on Bitbucket Pipelines at every pull requests, caching the images and avoid the long "Pulline images ..." would save me a lot of time.

This is my bitbucket-pipelines.yml file:

image: uber/android-build-environment:latest

definitions:
  services:
    docker:
      memory: 7128

pipelines:
  pull-requests:
    '**':
      - step:
          size: 2x
          name: "Run tests"
          caches:
            - gradle
          script:
            - ./accept-licenses.sh
            - ./gradlew testStageDevDebugUnitTest
      - step:
          size: 2x
          name: "Run build"
          caches:
            - gradle
          script:
            - export GRADLE_OPTS='-Dorg.gradle.parallel=false -Dorg.gradle.daemon=false'
            - ./accept-licenses.sh
            - ./gradlew assembleStageRelease 
Stoyan Milev
  • 725
  • 4
  • 17
Nifhel
  • 2,013
  • 2
  • 26
  • 39

1 Answers1

1

Have you tried adding in docker into the cache

caches:
  - gradle
  - docker
EugeneDeWaal
  • 216
  • 2
  • 15