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: distGotchas
- 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
How to Set Up an after-script in Bitbucket PipelinesRun cleanup or notification commands after a Bitbucket Pipelines step with after-script, which executes wheth…
How to Use Repository and Deployment Variables in Bitbucket PipelinesConfigure secrets and config in Bitbucket Pipelines with repository, workspace, and deployment variables - wh…