Skipping artifact downloads in Bitbucket Pipelines

Allowing pipelines steps to skip downloading artifacts has been a highly requested feature from our customers.

You can now disable artifact downloading on certain steps that do not require any artifacts, which will allow faster builds and can reduce your costs as a result.

Disabling artifact downloads during a step is as easy as switching off a flag. Note that these steps can still produce artifacts to pass down to future steps.

Here is an example utilizing the flag:

  pipelines:
  default:
    - step:
        name: Build and test
        image: node:10.15.0
        artifacts: # defining the artifacts to be passed to each future step.
          - dist/**
          - reports/*.txt
        caches:
          - node
        script:
          - npm install
          - npm test
          - npm run build
    - step:
        name: Integration test
        image: node:10.15.0
        caches:
          - node
        script: # By default, download artifacts from the previous step
          - cat reports/tests.txt
          - npm run integration-test
    - step: 
        name: A step that doesn't need artifacts
        artifacts:
          download: false # Disabling artifact downloads during this step
        script:
          - echo "Hello World!" > hello.txt
    - step: 
        name: A step that doesn't need artifacts, but may produce some
        artifacts:
          download: false # Disabling artifact downloads during this step
          paths:
            - hello.txt # defining the artifacts to be passed to each future step.
        script:
          - echo "Hello World!" > hello.txt

Further documentation on using artifacts in steps can be found here. We hope you and your team finds this extra flexibility helpful!

Happy coding!