Hi, I'm using bitbucket.org 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}" "https://api.bitbucket.org/2.0/repositories/${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?
TIA.