Skip to content
Latchkey

How to Use Pipes in Bitbucket Pipelines

A pipe is a packaged, reusable action you call with the pipe: key and a set of variables - like a marketplace action.

Reference a pipe by its Docker image and pass inputs under variables:. Atlassian and the community publish pipes for AWS, Slack, and more.

Upload to S3 with a pipe

The pipe encapsulates the AWS CLI calls; you only supply variables.

bitbucket-pipelines.yml
pipelines:
  default:
    - step:
        name: Upload
        script:
          - pipe: atlassian/aws-s3-deploy:1.6.0
            variables:
              AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
              AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
              AWS_DEFAULT_REGION: us-east-1
              S3_BUCKET: my-bucket
              LOCAL_PATH: dist

Gotchas

  • Pin the pipe version (:1.6.0) so a new release does not change behavior unexpectedly.
  • Pipe variables are passed through environment; mark credentials as Secured.
  • You can author a private pipe as a Docker image for internal reuse across repos.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →