cloudapi: add option to upload S3 artifacts publicly

A small test is added to cover this new option. Also, a check for AWS region
in the URL was removed. The public URL doesn't actually contain it and it's
imho useless - S3 buckets are always tied to a certain region.

The elaborate grep command parsing a path from a URI was switched to being
a small python script. The python script can actually handle an URI without
a query (which was always present in the pre-signed URI, but it's not in the
ordinary one)

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2022-08-15 15:57:43 +02:00 committed by Sanne Raymaekers
parent 54e2c2304c
commit d78f1e6229
5 changed files with 156 additions and 114 deletions

View file

@ -844,6 +844,16 @@ components:
region:
type: string
example: 'eu-west-1'
public:
type: boolean
default: false
description: |
If set to false (the default value), a long, obfuscated URL
is returned. Its expiration might be sooner than for other upload
targets.
If set to true, a shorter URL is returned and
its expiration is the same as for the other upload targets.
GCPUploadOptions:
type: object
required: