Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,277
Community Members
 
Community Events
168
Community Groups

Pipeline step executing pipe only

I have a Bitbucket Pipeline step that runs a Bitbucket Pipe, and just that, like this:

- step: &upload
name: Upload apk to Bitbucket project downloads
image: alpine:3.15
clone:
enabled: false
script:
- pipe: atlassian/bitbucket-upload-file:0.3.2
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "artifacts/*.apk"

I see that the Pipeline actually downloads alpine docker image first and then the atlassian/bitbucket-upload-file docker image:

  1. is there any use for the alpine docker image considering no explicit command is run on it?
  2. if there's no use, is there a way to speed up the process and have the Pipeline download just the atlassian/bitbucket-upload-file docker image?

Thanks

1 answer

1 accepted

1 vote
Answer accepted

@Diego hi. Thanks for your question. Firstly you should define your docker image for the pipeline infrastructure. In example: atlassian/default-image:3

Then inside a script section you define which pipe to use, and this pipe has its own docker image, that has its own logic for the pipe, but not for the pipeline infrastructure.

Also image inside a script section is optional.

Example:

image: atlassian/default-image:3

pipelines:
default:
- step: &upload
name: Upload apk to Bitbucket project downloads
script:
- pipe: atlassian/bitbucket-upload-file:0.3.2
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "artifacts/*.apk"   

 For more details refer to the configure bitbucket pipeline guide.

Regards, Igor

Thanks @Igor Stoyanov .

So I'll go ahead and answer my own question(s) based on your feedback.

 

  • is there any use for the alpine docker image considering no explicit command is run on it?

 

It looks there isn't any explicit use, but "you should define your docker image for the pipeline", whether it is at the top level or at the step level.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events