File extensions we tested succeccfully: zip, msi, whl, test and targz (both renamed tar.gz)
INFO: Executing the pipe...
INFO: Start uploading 1 files ['keycloak_1.1.0.tar.gz']...
Traceback (most recent call last):
File "/pipe.py", line 126, in <module>
pipe.run()
File "/pipe.py", line 80, in run
response = requests.post(url, auth=self.auth, files=multiple_files)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 371, in prepare
self.prepare_body(data, files, json)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 556, in prepare_body
(body, content_type) = self._encode_files(files, data)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 191, in _encode_files
fdata = fp.read()
File "/pipe.py", line 117, in read
with open(self.filename, self.mode) as f:
PermissionError: [Errno 13] Permission denied: 'keycloak_1.1.0.tar.gz'
Hello @stefan.arzbach ,
and welcome to the Community!
There shouldn't be any restriction on the extension of files that can be uploaded using the atlassian/bitbucket-upload pipe. Based on the error message in the output, this looks to be a permission issue instead, where the pipe does not have access to the file it's trying to upload (keycloak_1.1.0.tar.gz).
If your build is running with a different user than root, it may be creating that file with permissions limited to this user, so the pipe user may not have access to the file. To confirm if that's the case, could you try including the following command right before the pipe execution and try running it again?
script:
- <other commands you may have>
- chmod 777 "keycloak_1.1.0.tar.gz # give full permissions to the file
- pipe: atlassian/bitbucket-build-statistics:1.1.1
variables:
<pipe variables>
Thank you, @stefan.arzbach !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.