CodeBuild artifact upload to S3 root

0

Hi,
I have a CodeBuild config that almost meets our requirements, except for a tiny detail.
We need the artifacts to be uploaded to the S3 bucket root, not within a folder.

The default behavior to place artifacts in a folder with the same name as the build seems very strong. I have managed to override that by using the 'name' attribute within 'artifacts' but I have found no way to set name to empty string. When doing name: '' the attribute is disregarded.

Is there any way to make CodeBuild upload artifacts to the S3 bucket root?

Thanks,
Thomas Å.

gefragt vor 5 Jahren921 Aufrufe
3 Antworten
0

Hi takesson,

If you put a . in the name section of the artifacts it will place the artifacts in the root of the s3 bucket.

Let me know if you have any other questions,
John

beantwortet vor 5 Jahren
0

Hi John,

I thought I had tried name: . or name: '.' obviously not because it works fine.

The web console does not fully understand . because the link to S3 includes a . prefix. Not a big deal.

Many thanks for your help,
Thomas Å.

beantwortet vor 5 Jahren
0

Hi,

I'm having the same problem, but in my case the contents are being wrapped in a folder "site/".

I'm not sure where this folder is defined, and I've tried everything but it keeps putting the artifacts in that folder.

Any help will be appreciated!

Thanks,

Amy

EDIT: I solved it by setting both fields in the artefacts config (path, and name) as "."

Edited by: amypellegrini on Feb 11, 2021 1:25 AM

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen