Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Deployed build artefact being gunzip'd on upload

Hi, I'm using with a pipeline that is to create a tar like so;

- cd base && tar -cvf /tarball.tar *.conf
- cd overrides && tar -rvf /tarball.tar *.conf

The tar is created in two stages one from a base directory and then the tar is appended two with files to override data from the base. The next step in the pipeline is to gzip the tar file;

- gzip -v /tarball.tar

This leaves me with /tarball.tar.gz - which is all fine. This is then POST'd to the api to add it to the repo as a download;

- curl -v -S -L -X POST --user "${BB_AUTH_STRING}" "${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" -F files=@/tarball.tar.gz

I then get a file in the downloads area call tarball.tar.gz - all looks fine, however on downloading the file it is no longer a gzip'd file - it has become a non-gzip'd tar again.

$ file ~/Downloads/tarball.tar.gz
/home/my-user/Downloads/tarball.tar.gz: POSIX tar archive (GNU)

Why would this be happening? Is there any way to stop this or is this expected behaviour?


1 answer

0 votes

Hello @BR,

Looks like this is not related to Pipelines: uploading a file to Downloads in web UI leads to the same issue, i.e. uploaded and downloaded binaries differ.

Thanks for reporting about this problem! Do you mind filing a bug into our public issue tracker? This way you'll be notified as soon as we fix it.


Thanks for the extra info - I've filled a bug as BBS-123365. I'll mark this as answered on resolution of the bug.

Like Daniil Penkin likes this

Someone is looking into this bug - some interesting things to note however... you don't get the same results via the API;

$ curl -o download.tar.gz -s --user user:pass -L$USER/$REPO/downloads/tarball.tar.gz
$ file download.tar.gz
download.tar.gz: gzip compressed data, last modified: Tue Dec 3 21:37:30 2019, from Unix

Where as from the Web UI you get the following;

$ file ./Downloads/tarball.tar.gz 
./Downloads/tarball.tar.gz: POSIX tar archive (GNU)

So API calls are a workaround right now. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,111 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you