test/cases: tag aws s3 resources
all resources on aws originated from a test should be tagged with "gitlab-ci-test". this commit ensures s3 resources get tagged.
This commit is contained in:
parent
c6c311cc3d
commit
eed20916b0
1 changed files with 9 additions and 0 deletions
|
|
@ -895,6 +895,15 @@ function verifyInAWSS3() {
|
|||
local S3_URL
|
||||
S3_URL=$(echo "$UPLOAD_OPTIONS" | jq -r '.url')
|
||||
|
||||
# Tag the resource as a test file
|
||||
local S3_FILENAME
|
||||
S3_FILENAME=$(echo "${S3_URL}" | grep -oP '(?<=/)[^/]+(?=\?)')
|
||||
|
||||
$AWS_CMD s3api put-object-tagging \
|
||||
--bucket "${AWS_BUCKET}" \
|
||||
--key "${S3_FILENAME}" \
|
||||
--tagging '{"TagSet": [{ "Key": "gitlab-ci-test", "Value": "true" }]}'
|
||||
|
||||
# Download the commit using the Presigned URL
|
||||
curl "${S3_URL}" --output "${WORKDIR}/edge-commit.tar"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue