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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ