bitbucket-upload-file pipe fails when PWD of script is not CLONE_DIR

Markus Napp
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2024

When using 0.7.3 of the upload pipe you can shoot yourself in the foot if you have navigated away from the clone dir with your script entries in the step.

The pipe will not find any globbed file patterns.

You need to navigate to `$BITBUCKET_CLONE_DIR` before inintializing the pipe.

When the pipe starts the nested container it uses `--workdir=${pwd}`. So if your main container is on a different working directory, the glob pattern will be wrong since it's only correct when relative to the clone dir.

Please adjust the documentation to mention that your working directory needs to be the clone dir before invoking the upload pipe.

1 answer

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2024

@Markus Napp . Thank you you for your suggestion.

It is already added in the variables description.

FILENAME (*) - Name of the local file to upload. Supports glob patterns "*". e.g. *.html. Limit max 10 files, if limit reached - build fails. Accepts files only from BITBUCKET_CLONE_DIR or any subfolders in this path.

Also we will consider adding some logs to the pipe, so the logic will be more clear during pipe execution.

Regards, Igor

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events