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

질문됨 5년 전920회 조회
3개 답변
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

답변함 5년 전
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 Å.

답변함 5년 전
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

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠