When uploading an *.tar.gz build artifact to Cloud Storage bucket, it wrongfully applies MIME type application/tar, while it would have to apply MIME type application/tar+gzip (or the official MIME type application/gzip), in order to be able to download and extract the uploaded *.tar.gz archive then again. This only works, when I manually set the MIME type afterwards (in the object details), but I'd be looking for a way, to define the proper MIME type right away. How this can be done?
The cloudbuild.yaml which produces the issue roughly looks alike this:
steps:
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:latest'
entrypoint: 'bash'
args:
- '-c'
- |-
- tar -zcf ./test_${SHORT_SHA}.tar.gz ./$_UPLOAD_DIRNAME
env:
- '_UPLOAD_DIRNAME=$_UPLOAD_DIRNAME'
- 'SHORT_SHA=$SHORT_SHA'
artifacts:
objects:
location: 'gs://some-bucket/'
paths: ['*.tar.gz']