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 Å.

preguntada hace 5 años920 visualizaciones
3 Respuestas
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

respondido hace 5 años
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 Å.

respondido hace 5 años
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

respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas